From 5b7b4077939255d72853c3ff6ff437abafb93f88 Mon Sep 17 00:00:00 2001 From: cxhong Date: Tue, 21 Aug 2018 02:23:56 -0400 Subject: [PATCH] update onie doc to add rspconfig sshcfg command (#5539) --- .../networks/onie_switches/os_cumulus/install.rst | 2 +- xCAT-server/lib/xcat/plugins/onie.pm | 2 ++ xCAT-server/lib/xcat/plugins/switch.pm | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst index 4be0107b8..ca7dcdf76 100644 --- a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst @@ -86,7 +86,7 @@ To ease in the management of the switch, xCAT provides a script to help configur Execute the following to sync the xCAT keys to the switch: :: - /opt/xcat/share/xcat/scripts/configonie --switches frame01sw1 --ssh + rspconfig frame01sw1 sshcfg Validate the ssh keys are correctly configured by running a ``xdsh`` command: :: diff --git a/xCAT-server/lib/xcat/plugins/onie.pm b/xCAT-server/lib/xcat/plugins/onie.pm index 18c2f2919..817c4d8eb 100644 --- a/xCAT-server/lib/xcat/plugins/onie.pm +++ b/xCAT-server/lib/xcat/plugins/onie.pm @@ -107,6 +107,8 @@ sub process_request { my $subcmd = $exargs[0]; if ($subcmd eq 'sshcfg') { process_sshcfg($nodes, $callback); + } else { + xCAT::MsgUtils->message("I", { data => ["The rspconfig command $subcmd is not supported"] }, $callback); } } diff --git a/xCAT-server/lib/xcat/plugins/switch.pm b/xCAT-server/lib/xcat/plugins/switch.pm index 1639b3be0..94b1ba96a 100644 --- a/xCAT-server/lib/xcat/plugins/switch.pm +++ b/xCAT-server/lib/xcat/plugins/switch.pm @@ -420,9 +420,12 @@ sub process_switch_config { xCAT::MellanoxIB::setConfig($nodes, $callback, $subreq, $subcommand, $argument); } } else { - my $rsp = {}; - $rsp->{error}->[0] = "The following '$t' switches are unsuppored:\n@$nodes"; - $callback->($rsp); + #onie switch will processed in the onie plug in + unless ($t =~ /onie/i) { + my $rsp = {}; + $rsp->{error}->[0] = "The following '$t' switches are not supported:\n@$nodes"; + $callback->($rsp); + } } } }