mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-05-05 16:49:08 +00:00
Docker container lifecycle management (mgt=docker, mkdocker, rmdocker, lsdocker) was added in 2015-2016 as an experiment targeting Docker API v1.22 on Ubuntu only. Documentation and man pages were deliberately removed in 2019 (PRs #6222 and #6324) with the original developer's approval, noting that "the interface of Docker has become very simple right now, so there is no value for xCAT to offer such functions." The plugin was still being shipped but has had no functional code changes since April 2016, was never listed as a valid mgt value in Schema.pm, and no user ever filed an issue about it. Removed: - xCAT-server/lib/xcat/plugins/docker.pm (1,142 lines) - xCAT/postscripts/setupdockerhost - xCAT-server/share/xcat/scripts/setup-dockerhost-cert.sh - xCAT-test/autotest/testcase/dockercommand/ (test cases) - Docker attribute definitions in Schema.pm - Client symlinks (mkdocker, rmdocker, lsdocker) - Usage entries and dockerhost cert handling in credentials.pm - Docker attribute documentation in man7 pages The "Running xCAT in Docker" documentation (dockerized_xcat/) is retained as it documents containerizing xCAT itself, not the removed mgt=docker feature. Closes #7518
100 lines
3.3 KiB
Perl
100 lines
3.3 KiB
Perl
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
package xCAT_plugin::AAAusage;
|
|
use strict;
|
|
use xCAT::Usage;
|
|
##########################################################################
|
|
# Common help plugin for table-driven commands
|
|
##########################################################################
|
|
|
|
##########################################################################
|
|
# Command handler method from tables
|
|
##########################################################################
|
|
sub handled_commands {
|
|
return {
|
|
rnetboot => 'AAAusage',
|
|
rpower => 'AAAusage',
|
|
rbeacon => 'AAAusage',
|
|
rvitals => 'AAAusage',
|
|
reventlog => 'AAAusage',
|
|
rinv => 'AAAusage',
|
|
rsetboot => 'AAAusage',
|
|
rbootseq => 'AAAusage',
|
|
rscan => 'AAAusage',
|
|
rspconfig => 'AAAusage',
|
|
getmacs => 'AAAusage',
|
|
mkvm => 'AAAusage',
|
|
lsvm => 'AAAusage',
|
|
chvm => 'AAAusage',
|
|
rmvm => 'AAAusage',
|
|
|
|
#lsslp => 'AAAusage',
|
|
rflash => 'AAAusage',
|
|
mkhwconn => 'AAAusage',
|
|
rmhwconn => 'AAAusage',
|
|
lshwconn => 'AAAusage',
|
|
renergy => 'AAAusage',
|
|
nodeset => 'AAAusage',
|
|
rspreset => 'AAAusage',
|
|
rmhypervisor => 'AAAusage',
|
|
rmigrate => 'AAAusage',
|
|
rshutdown => 'AAAusage',
|
|
};
|
|
}
|
|
|
|
|
|
##########################################################################
|
|
# Pre-process request from xCat daemon
|
|
##########################################################################
|
|
sub preprocess_request {
|
|
my $request = shift;
|
|
|
|
#if ($request->{_xcatdest}) { return [$request]; } #exit if preprocessed
|
|
|
|
if (($request->{_xcatpreprocessed}) and ($request->{_xcatpreprocessed}->[0] == 1)) { return [$request]; }
|
|
my $callback = shift;
|
|
my @requests;
|
|
|
|
#display usage statement if -h is present or no noderage is specified
|
|
my $noderange = $request->{node}; #Should be arrayref
|
|
my $command = $request->{command}->[0];
|
|
my $extrargs = $request->{arg};
|
|
my @exargs = ($request->{arg});
|
|
if (ref($extrargs)) {
|
|
@exargs = @$extrargs;
|
|
}
|
|
if (($#exargs == -1) or (($#exargs == 0) and ($exargs[0] =~ /^\s*$/)) and (!$noderange and $command ne "lsslp")) {
|
|
$exargs[0] = "--help"; # force help if no args
|
|
}
|
|
|
|
# rflash: -p flag is to specify a directory, which will be parsed as a node range with regular expression
|
|
# stop the rflash command without noderange
|
|
# rflash -p /tmp/test --activate disruptive
|
|
# where the /tmp/test will be treated as noderange with regular expression
|
|
# this is a general issue for the xcatclient commands, if with a flag can be followed by directory
|
|
# however, rflash is the only one we can think of for now.
|
|
if (!$noderange and $command eq "rflash") {
|
|
$exargs[0] = "--help";
|
|
}
|
|
|
|
my $usage_string = xCAT::Usage->parseCommand($command, @exargs);
|
|
if ($usage_string) {
|
|
$callback->({ data => [$usage_string] });
|
|
$request = {};
|
|
return;
|
|
}
|
|
|
|
}
|
|
|
|
##########################################################################
|
|
# Process request from xCat daemon
|
|
##########################################################################
|
|
sub process_request {
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
1;
|