rspconfig network - xcat2/xcat-core GitHub Wiki
-
Add new IP object: # curl -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data":["xyz.openbmc_project.Network.IP.Protocol.IPv4","x.x.x.x",x,"x.x.x.x"]}' https://x.x.x.x/yz/openbmc_project/network/#NIC#/action/IP
-
Add new VLAN object: # curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data": [#NIC#,x] }' https://x.x.x.x/xyz/openbmc_project/network/action/VLAN
-
Delete old IP object: # curl -b cjar -k -H "Content-Type: application/json" -X DELETE https://x.x.x.x/xyz/openbmc_project/network/#NIC#/ipv4/xx
-
Disable DHCP: # curl -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data":0}' https://x.x.x.x/xyz/openbmc_project/network/#NIC#/attr/DHCPEnabled
rspconfig ip=x.x.x.x netmask=x gateway=x.x.x.x
rspconfig vlan=x ip=x.x.x.x netmask=x gateway=x.x.x.x
-
LOGIN β> RSPCONFIG_GET β> RSPCONFIG_IPOBJECT β> RSPCONFIG_CHECK β> (DHCP_DISABLED or RSPCONFIG_DELETE)
-
LOGIN β> RSPCONFIG_GET β> RSPCONFIG_VLAN β> RSPCONFIG_IPOBJECT β> RSPCONFIG_CHECK β> (DHCP_DISABLED or RSPCONFIG_DELETE)
If the original IP is DHCP, itβs DHCP_DISABLED.
If is Static, itβs RSPCONFIG_DELETE.
RSPCONFIG_GET: save NIC in %node_info. Replace #NIC# string used in next status.
RSPCONFIG_VLAN: update NIC in %node_info, and url of RSPCONFIG_IPOBJECT.
RSPCONFIG_CHECK: check setting whether successfully. Update url of RSPCONFIG_DELETE or DHCP_DISABLED.