diff options
author | Danny Nold <danny.nold@calxeda.com> | 2012-10-16 13:39:57 -0500 |
---|---|---|
committer | Danny Nold <danny.nold@calxeda.com> | 2012-10-16 13:41:52 -0500 |
commit | d8f312335d3908203a2e6d0e81b7d2a80688d45a (patch) | |
tree | 52db9a81f6d3ae2c4301b461ff3176bd0f0ffb01 | |
parent | c72b9e27e2964c57f7a656035788df703529ec1a (diff) | |
download | ipmitool-1.8.11-cx_2012.10.19.tar.gz |
Add "factory_config" cmd to allow whole fabric or individual nodesv1.8.11-cx_2012.10.19
to have configuration reset to the factory default values.
Signed-off-by: Danny Nold <danny.nold@calxeda.com>
-rwxr-xr-x | include/ipmitool/ipmi_cxoem.h | 1 | ||||
-rwxr-xr-x | lib/ipmi_cxoem.c | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/include/ipmitool/ipmi_cxoem.h b/include/ipmitool/ipmi_cxoem.h index 4b9d552..cc7282d 100755 --- a/include/ipmitool/ipmi_cxoem.h +++ b/include/ipmitool/ipmi_cxoem.h @@ -59,6 +59,7 @@ #define IPMI_CMD_OEM_FABRIC_INFO 0xEE #define IPMI_CMD_OEM_FABRIC_SET_WATCH 0xEF #define IPMI_CMD_OEM_FABRIC_CLEAR_WATCH 0xF0 +#define IPMI_CMD_OEM_FABRIC_FACTORY_DEFAULT 0xF1 #define IPMI_CMD_OEM_FABRIC_PARAMETER_IPADDR 0x1 #define IPMI_CMD_OEM_FABRIC_PARAMETER_NETMASK 0x2 diff --git a/lib/ipmi_cxoem.c b/lib/ipmi_cxoem.c index 5dbe776..052218b 100755 --- a/lib/ipmi_cxoem.c +++ b/lib/ipmi_cxoem.c @@ -143,6 +143,7 @@ static void cx_fabric_usage(void) "\n" " set|get <parameter> <value> [node <node_id>]\n" " where parameter = node_id, ipaddr, netmask, defgw, ipsrc, macaddr\n" + " factory_default node <node_id>\n" " update_config node <node_id>\n" "\n" "Ex: ipmitool cxoem fabric get ipaddr node 1\n" @@ -163,6 +164,7 @@ static void cx_fabric_usage(void) " 0 - all interfaces go to Uplink0\n" " 1 - managment interfaces go to Uplink0, server interfaces go to Uplink1\n" " 2 - managment and eth0 interfaces go to Uplink0, eth1 interfaces go to Uplink1\n" + " factory_default\n" " update_config\n" "\n" "Ex: ipmitool cxoem fabric config get ipinfo tftp 10.1.1.1 port 69 file ipinfo.out\n" @@ -1155,6 +1157,15 @@ cx_fabric_cmd_t update_cmd = { {0, 0, 0, 0, 0} }; +cx_fabric_cmd_t factory_default_node_cmd = { + "factory_default", + IPMI_CMD_OEM_FABRIC_FACTORY_DEFAULT, + 0, 0, + {0, 0, 0, 0, 0}, + {IPMI_CMD_OEM_FABRIC_SPECIFIER_NODE, 0, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + cx_fabric_cmd_t get_cmd = { "get", IPMI_CMD_OEM_FABRIC_GET, @@ -1599,6 +1610,7 @@ cx_fabric_arg_t cx_fabric_main_arg[] = { {"rm", Cx_Fabric_Arg_Command, (void *)&rm_cmd}, {"info", Cx_Fabric_Arg_Command, (void *)&info_cmd}, {"update_config", Cx_Fabric_Arg_Command, (void *)&update_cmd}, + {"factory_default", Cx_Fabric_Arg_Command, (void *)&factory_default_node_cmd}, {"ipaddr", Cx_Fabric_Arg_Parameter, (void *)&ipaddr_param}, {"ipsrc", Cx_Fabric_Arg_Parameter, (void *)&ipsrc_param}, {"netmask", Cx_Fabric_Arg_Parameter, (void *)&netmask_param}, @@ -1679,6 +1691,15 @@ cx_fabric_cmd_t update_config_cmd = { {0, 0, 0, 0, 0} }; +cx_fabric_cmd_t factory_default_cmd = { + "factory_default", + IPMI_CMD_OEM_FABRIC_FACTORY_DEFAULT, + 0, 0, + {0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + cx_fabric_param_t ipinfo_config_param = { "ipinfo", IPMI_CMD_OEM_FABRIC_PARAMETER_IPINFO, @@ -1756,6 +1777,7 @@ cx_fabric_arg_t cx_fabric_config_arg[] = { {"get", Cx_Fabric_Arg_Command, (void *)&config_get_cmd}, {"set", Cx_Fabric_Arg_Command, (void *)&config_set_cmd}, {"update_config", Cx_Fabric_Arg_Command, (void *)&update_config_cmd}, + {"factory_default", Cx_Fabric_Arg_Command, (void *)&factory_default_cmd}, {"ipinfo", Cx_Fabric_Arg_Parameter, (void *)&ipinfo_config_param}, {"ipsrc", Cx_Fabric_Arg_Parameter, (void *)&ipsrc_config_param}, {"mtu", Cx_Fabric_Arg_Parameter, (void *)&mtu_config_param}, |