{
"Resources": [
{
"Uri": "/cli/v1/_/backupipaddr",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set backup ip address",
"Usage": "ipmcset -d backupipaddr -v <ipaddr> <mask> [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ipaddr": {
"Required": true,
"Type": "string",
"Validator": [
{
"Type": "IPFormat"
}
]
},
"mask": {
"Type": "string",
"Required": true
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/Ipv4/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv4/Interface}",
"Source": {
"BackupIpAddr": "${ReqBody/ipaddr}",
"BackupSubnetMask": "${ReqBody/mask}"
}
}
],
"Echoes": [
"ipmcset/_backupipaddr",
""
]
}
]
},
{
"Uri": "/cli/v1/_/gateway",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set gateway",
"Usage": "ipmcset -d gateway -v <gateway> [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"gateway": {
"Type": "string",
"Required": true
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"IsIpv4Address": "${Statements/IsIpv4Address()}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"IsIpv4Address": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.ipaddress.is_ipv4_address(ReqBody.gateway)"
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "${Statements/PatchGroupID()/Ipv4/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv4/Interface}",
"Name": "${Statements/PatchGroupID()/Ipv4/SetDefaultGateway}",
"Params": [
"${ReqBody/gateway}"
],
"CallIf": {
"${Statements/IsIpv4Address()}": 0
}
}
],
"Echoes": [
"ipmcset/_gateway",
""
]
}
]
},
{
"Uri": "/cli/v1/_/gateway6",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set ipv6 gateway",
"Usage": "ipmcset -d gateway6 -v <gateway> [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"gateway": {
"Type": "string",
"Required": true
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "${Statements/PatchGroupID()/Ipv6/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv6/Interface}",
"Name": "${Statements/PatchGroupID()/Ipv6/SetDefaultGateway}",
"Params": [
"${ReqBody/gateway}"
],
"Destination": {
"Result": "Result"
}
}
],
"Echoes": [
"ipmcset/_gateway6",
""
]
}
]
},
{
"Uri": "/cli/v1/_/ipaddr",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set ip address",
"Usage": "ipmcset -d ipaddr -v <ipaddr> <mask> [gateway] [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ipaddr": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$"
}
]
},
"mask": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$"
}
]
},
"gateway": {
"Type": "string",
"Required": false,
"Validator": [
{
"Type": "Regex",
"Formula": "^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$"
}
]
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"gateway": "${ReqBody/gateway}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"Ipv4Gateway": {
"Input": "${ReqBody/gateway}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": null,
"To": "null"
}
]
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/Ipv4/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv4/Interface}",
"Destination": {
"DefaultGateway": "DefaultGateway"
}
},
{
"Type": "Method",
"Path": "${Statements/PatchGroupID()/Ipv4/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv4/Interface}",
"Name": "SetIpMaskGateway",
"Params": [
"${ReqBody/ipaddr}",
"${ReqBody/mask}",
"${Statements/Ipv4Gateway()}"
],
"CallIf": {
"${ReqBody/gateway}": "#WITHOUT"
}
},
{
"Type": "Method",
"Path": "${Statements/PatchGroupID()/Ipv4/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv4/Interface}",
"Name": "SetIpMaskGateway",
"Params": [
"${ReqBody/ipaddr}",
"${ReqBody/mask}",
"${ReqBody/gateway}"
],
"CallIf": {
"${ReqBody/gateway}": "#WITH"
}
}
],
"Echoes": [
"ipmcset/_ipaddr",
""
]
}
]
},
{
"Uri": "/cli/v1/_/ipaddr6",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set ipv6 address",
"Usage": "ipmcset -d ipaddr6 -v <ipaddr6/prefixlen(0~128)> [gateway6] [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"value1": {
"Type": "string",
"Required": true
},
"value2": {
"Type": "string",
"Required": false
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"value2": "${ReqBody/value2}",
"Value1Valid": "${Statements/Value1Valid()}",
"PrefixlenValid": "${Statements/PrefixlenValid()}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"Value1Valid": {
"Steps": [
{
"Type": "Script",
"Formula": "local s, e = string.find(ReqBody.value1, '/', 1) return s ~= nil"
}
]
},
"Ipaddr6": {
"Steps": [
{
"Type": "Script",
"Formula": "local s, e = string.find(ReqBody.value1, '/', 1) return string.sub(ReqBody.value1, 1, s - 1)"
}
]
},
"PrefixlenValid": {
"Steps": [
{
"Type": "Script",
"Formula": "check_prefix_len_valid.lua"
}
]
},
"Prefixlen": {
"Steps": [
{
"Type": "Script",
"Formula": "local s, e = string.find(ReqBody.value1, '/', 1) return math.tointeger(string.sub(ReqBody.value1, e + 1))"
}
]
},
"Ipv6Gateway": {
"Input": "${ReqBody/value2}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": null,
"To": "null"
}
]
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/Ipv6/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv6/Interface}",
"Destination": {
"${Statements/PatchGroupID()/Ipv6/SetDefaultGateway}": "DefaultGateway"
}
},
{
"Type": "Method",
"Path": "${Statements/PatchGroupID()/Ipv6/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv6/Interface}",
"Name": "SetIpv6PrefixGateway",
"Params": [
"${Statements/Ipaddr6()}",
"${Statements/Prefixlen()}",
"${Statements/Ipv6Gateway()}"
],
"CallIf": {
"${ReqBody/value2}": "#WITHOUT",
"${Statements/Value1Valid()}": true,
"${Statements/PrefixlenValid()}": true
}
},
{
"Type": "Method",
"Path": "${Statements/PatchGroupID()/Ipv6/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv6/Interface}",
"Name": "SetIpv6PrefixGateway",
"Params": [
"${Statements/Ipaddr6()}",
"${Statements/Prefixlen()}",
"${ReqBody/value2}"
],
"CallIf": {
"${ReqBody/value2}": "#WITH",
"${Statements/Value1Valid()}": true,
"${Statements/PrefixlenValid()}": true
}
}
],
"Echoes": [
"ipmcset/_ipaddr6",
""
]
}
]
},
{
"Uri": "/cli/v1/_/ipmode",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set ip mode",
"Usage": "ipmcset -d ipmode -v <dhcp|static> [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ipmode": {
"Required": true,
"Type": "string",
"Validator": [
{
"Type": "Enum",
"Formula": [
"dhcp",
"static"
]
}
]
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"ipmode": "${ReqBody/ipmode}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"ipmode": {
"Input": "${ReqBody/ipmode}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "dhcp",
"To": "DHCP"
},
{
"Case": "static",
"To": "Static"
}
]
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/Ipv4/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv4/Interface}",
"Source": {
"IpMode": "${Statements/ipmode()}"
}
}
],
"Echoes": [
"ipmcset/_ipmode",
""
]
}
]
},
{
"Uri": "/cli/v1/_/ipversion",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set ip version",
"Usage": "ipmcset -d ipversion -v <ipversion> [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ipversion": {
"Required": true,
"Type": "integer",
"Validator": [
{
"Type": "Enum",
"Formula": [
0,
1,
2
]
}
],
"Description": "\n\t0 IPv4\n\t1 IPv6\n\t2 IPv4AndIPv6"
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"IpVersion": "${Statements/IpVersion()}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"IpVersion": {
"Input": "${ReqBody/ipversion}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": 0,
"To": "IPv4"
},
{
"Case": 1,
"To": "IPv6"
},
{
"Case": 2,
"To": "IPv4AndIPv6"
}
]
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/EthernetInterfaces/Path}",
"Interface": "${Statements/PatchGroupID()/EthernetInterfaces/Interface}",
"Source": {
"IpVersion": "${Statements/IpVersion()}"
}
}
],
"Echoes": [
"ipmcset/_ipversion",
""
]
}
]
},
{
"Uri": "/cli/v1/_/ipmode6",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set ipv6 mode",
"Usage": "ipmcset -d ipmode6 -v <dhcp|static> [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ipmode": {
"Required": true,
"Type": "string",
"Validator": [
{
"Type": "Enum",
"Formula": [
"dhcp",
"static"
]
}
]
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"ipmode": "${ReqBody/ipmode}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"ipmode": {
"Input": "${ReqBody/ipmode}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "dhcp",
"To": "DHCPv6"
},
{
"Case": "static",
"To": "Static"
}
]
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/Ipv6/Path}",
"Interface": "${Statements/PatchGroupID()/Ipv6/Interface}",
"Source": {
"${Statements/PatchGroupID()/Ipv6/IpMode}": "${Statements/ipmode()}"
}
}
],
"Echoes": [
"ipmcset/_ipmode",
""
]
}
]
},
{
"Uri": "/cli/v1/_/netmode",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set net mode",
"Usage": "ipmcset -d netmode -v <option> [groupid]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"option": {
"Type": "integer",
"Required": true,
"Description": "\n 1 Manual\n 2 Adaptive",
"Validator": [
{
"Type": "Enum",
"Formula": [
1,
2
]
}
]
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"option": "${ReqBody/option}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"option_str": {
"Input": "${ReqBody/option}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": 1,
"To": "Fixed"
},
{
"Case": 2,
"To": "Automatic"
}
]
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/EthernetInterfaces/Path}",
"Interface": "${Statements/PatchGroupID()/EthernetInterfaces/Interface}",
"Source": {
"NetMode": "${Statements/option_str()}"
}
}
],
"Echoes": [
"ipmcset/_netmode",
""
]
}
]
},
{
"Uri": "/cli/v1/_/vlan",
"Interfaces": [
{
"Type": "Patch",
"Description": "Set sideband vlan",
"Usage": "ipmcset -d vlan -v <off | id(1~4094)> [port type]",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"vlanid": {
"Required": false
},
"port_type": {
"Required": false
}
}
},
"RspBody": {
"DedicatedVlanSupported": "${ProcessingFlow[1]/Destination/DedicatedVlanSupported}",
"SetVlanParams": "${Statements/SetVlanParams()}",
"Result": "${ProcessingFlow[2]/Destination/Result}",
"MinVLANId": "${ProcessingFlow[3]/Destination/MinVLANId}",
"MaxVLANId": "${ProcessingFlow[3]/Destination/MaxVLANId}"
},
"Statements": {
"SetVlanParams": {
"Steps": [
{
"Type": "Script",
"Formula": "check_vlan_id_params.lua"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/Managers/1/EthernetInterfaces",
"Interface": "bmc.kepler.Managers.MgmtPortCapability",
"Destination": {
"DedicatedVlanSupported": "DedicatedVlanSupported"
}
},
{
"Type": "Method",
"Path": "/bmc/kepler/Managers/1/EthernetInterfaces",
"Interface": "bmc.kepler.Managers.EthernetInterfaces",
"Name": "SetVLANConfig",
"Params": [
"${Statements/SetVlanParams()[2]}",
"${Statements/SetVlanParams()[3]}",
"${Statements/SetVlanParams()[4]}"
],
"Destination": {
"Result": "Result"
},
"CallIf": {
"${Statements/SetVlanParams()[1]}": true
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/Managers/1/EthernetInterfaces",
"Interface": "bmc.kepler.Managers.EthernetInterfaces",
"Destination": {
"MinVLANId": "MinVLANId",
"MaxVLANId": "MaxVLANId"
}
}
],
"Echoes": [
"ipmcset/_vlan",
""
]
}
]
},
{
"Uri": "/cli/v1/_/activeport",
"Interfaces": [
{
"Type": "Patch",
"Usage": "ipmcset -d activeport -v <option> [portid] [groupid]",
"Description": "Set EthGroup active port",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"port_type": {
"Type": "integer",
"Required": false
},
"port_num": {
"Type": "integer",
"Required": false
},
"group_id": {
"Type": "integer",
"Required": false
}
}
},
"RspBody": {
"port_type": "${ReqBody/port_type}",
"port_num": "${ReqBody/port_num}",
"port_type_list": "${Statements/port_type_list()}",
"params_valid": "${Statements/params_valid()}",
"port_exist": "${Statements/port_exist()[1]}",
"netmode_is_supported": "${Statements/netmode_is_supported()}",
"IsGroupIdValid": "${Statements/PatchGroupID()/IsGroupIdValid}"
},
"Statements": {
"port_type_list": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.bmc_network.get_active_port_type_list(ProcessingFlow[1].Destination.port_paths)"
}
]
},
"params_valid": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.bmc_network.check_active_port_param_valid(ReqBody.port_type,ReqBody.port_num,ProcessingFlow[1].Destination.port_paths)"
}
]
},
"port_exist": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.bmc_network.check_port_exist(ReqBody.port_type,ReqBody.port_num,ProcessingFlow[1].Destination.port_paths)"
}
]
},
"netmode_is_supported": {
"Input": "${ProcessingFlow[2]/Destination/NetMode}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "Fixed",
"To": true
},
{
"To": false
}
]
}
]
},
"PatchGroupID": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.multi_patch.patch_eth_info(ReqBody.group_id)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "List",
"Path": "/bmc/kepler/Managers/1/EthernetInterfaces",
"Interface": "bmc.kepler.Managers.EthernetInterfaces.MgmtPort",
"Destination": {
"Members": "port_paths"
}
},
{
"Type": "Property",
"Path": "${Statements/PatchGroupID()/EthernetInterfaces/Path}",
"Interface": "${Statements/PatchGroupID()/EthernetInterfaces/Interface}",
"Destination": {
"${Statements/PatchGroupID()/EthernetInterfaces/VLANEnable}": "VLANEnable",
"VLANId": "VLANId",
"NetMode": "NetMode"
}
},
{
"Type": "Method",
"Path": "${Statements/PatchGroupID()/EthernetInterfaces/Path}",
"Interface": "${Statements/PatchGroupID()/EthernetInterfaces/Interface}",
"Name": "SetNetworkConfig",
"Params": [
"${ProcessingFlow[2]/Destination/NetMode}",
"${Statements/port_exist()[2]}",
"${ProcessingFlow[2]/Destination/VLANEnable}",
"${ProcessingFlow[2]/Destination/VLANId}"
],
"CallIf": {
"${Statements/params_valid()}": true,
"${Statements/port_exist()[1]}": true,
"${Statements/netmode_is_supported()}": true
}
}
],
"Echoes": [
"ipmcset/_activeport",
""
]
}
]
}
]
}