prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.
Change-Id: I455b949e6d20dcc5617774d521b77fb985c48122
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/README.md b/README.md
index db06feb..f7a482d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
## To Build
+
```
To build this package, do the following steps:
diff --git a/docs/Network-Configuration.md b/docs/Network-Configuration.md
index d7f0e38..a5dcea5 100644
--- a/docs/Network-Configuration.md
+++ b/docs/Network-Configuration.md
@@ -2,17 +2,17 @@
## Overview
-A Network Manager is a daemon which handles network management operations.
-It must implement the `xyz.openbmc_project.Network.SystemConfiguration.interface`
+A Network Manager is a daemon which handles network management operations. It
+must implement the `xyz.openbmc_project.Network.SystemConfiguration.interface`
and `org.freedesktop.DBus.ObjectManager`.
-When the network manager daemon comes up, it should create objects
-implementing physical link/virtual interfaces such as
+When the network manager daemon comes up, it should create objects implementing
+physical link/virtual interfaces such as
`xyz.openbmc_project.Network.EthernetInterface` or
`xyz.openbmc_project.Network.VLANInterface` on the system.
-IP address(v4 and v6) objects must be children objects of the
-physical/virtual interface object.
+IP address(v4 and v6) objects must be children objects of the physical/virtual
+interface object.
## Interfaces
@@ -29,15 +29,15 @@
Interface objects can be physical as well as virtual.
-If the object is a physical interface, it can't be deleted,
-but if it is a virtual interface object it can be deleted.
+If the object is a physical interface, it can't be deleted, but if it is a
+virtual interface object it can be deleted.
Example: `/xyz/openbmc_project/network/eth0`
## IPAddress Objects
-There can be multiple IP address objects under an interface object.
-These objects can be deleted by the delete function.
+There can be multiple IP address objects under an interface object. These
+objects can be deleted by the delete function.
IPv4 objects will have the following D-Bus object path.
@@ -57,100 +57,145 @@
## Configure IP address:
-busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/<interface> xyz.openbmc_project.Network.IP.Create IP ssys "xyz.openbmc_project.Network.IP.Protocol.IPv4" "<ip>" <subnetmask> "<networkgateway>"
+busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/<interface>
+xyz.openbmc_project.Network.IP.Create IP ssys
+"xyz.openbmc_project.Network.IP.Protocol.IPv4" "<ip>" <subnetmask>
+"<networkgateway>"
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data":["xyz.openbmc_project.Network.IP.Protocol.IPv4","<ip>",<subnetmask>,"<networkGateway>"]
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d
+'{"data":["xyz.openbmc_project.Network.IP.Protocol.IPv4","<ip>",<subnetmask>,"<networkGateway>"]
}' https://<hostname/ip>/xyz/openbmc_project/network/eth0/action/IP
## Configure Default Gateway
### Get
-busctl get-property xyz.openbmc_project.Network /xyz/openbmc_project/network/config xyz.openbmc_project.Network.SystemConfiguration DefaultGateway
+busctl get-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/config
+xyz.openbmc_project.Network.SystemConfiguration DefaultGateway
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://<hostname/ip>/xyz/openbmc_project/network/config/attr/DefaultGateway
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET
+https://<hostname/ip>/xyz/openbmc_project/network/config/attr/DefaultGateway
### Set
-busctl set-property xyz.openbmc_project.Network /xyz/openbmc_project/network/config xyz.openbmc_project.Network.SystemConfiguration DefaultGateway s "<DefaultGateway>"
+busctl set-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/config
+xyz.openbmc_project.Network.SystemConfiguration DefaultGateway s
+"<DefaultGateway>"
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "x.x.x.x"}' https://<hostname/ip>/xyz/openbmc_project/network/config/attr/DefaultGateway
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data":
+"x.x.x.x"}'
+https://<hostname/ip>/xyz/openbmc_project/network/config/attr/DefaultGateway
-NOTE: Since the system does not allow unpingable gateway address, make sure the gateway address is pingable.
+NOTE: Since the system does not allow unpingable gateway address, make sure the
+gateway address is pingable.
## Configure HostName
### Get
-busctl get-property xyz.openbmc_project.Network /xyz/openbmc_project/network/config xyz.openbmc_project.Network.SystemConfiguration HostName
+busctl get-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/config
+xyz.openbmc_project.Network.SystemConfiguration HostName
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://<hostname/ip>/xyz/openbmc_project/network/config/attr/HostName
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET
+https://<hostname/ip>/xyz/openbmc_project/network/config/attr/HostName
### Set
-busctl set-property xyz.openbmc_project.Network /xyz/openbmc_project/network/config xyz.openbmc_project.Network.SystemConfiguration HostName s "<HostName>"
+busctl set-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/config
+xyz.openbmc_project.Network.SystemConfiguration HostName s "<HostName>"
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "<hostname>"}' https://<hostname/ip>/xyz/openbmc_project/network/config/attr/HostName
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data":
+"<hostname>"}'
+https://<hostname/ip>/xyz/openbmc_project/network/config/attr/HostName
## Delete IP address
-busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/<interface>/ipv4/<id> xyz.openbmc_project.Object.Delete Delete
+busctl call xyz.openbmc_project.Network
+/xyz/openbmc_project/network/<interface>/ipv4/<id>
+xyz.openbmc_project.Object.Delete Delete
-NOTE: How to get the ipv4/id: After creating the IP address object enumerate the network interface object.
+NOTE: How to get the ipv4/id: After creating the IP address object enumerate the
+network interface object.
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X DELETE https://<hostname/ip>/xyz/openbmc_project/network/eth0/ipv4/fbfc29b
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X DELETE
+https://<hostname/ip>/xyz/openbmc_project/network/eth0/ipv4/fbfc29b
## Configure DHCP
### Get
-busctl get-property xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.EthernetInterface DHCPEnabled
+busctl get-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.EthernetInterface
+DHCPEnabled
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/DHCPEnabled
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET
+https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/DHCPEnabled
### Set
-busctl set-property xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.EthernetInterface DHCPEnabled b 1
+busctl set-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.EthernetInterface
+DHCPEnabled b 1
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": 1}' https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/DHCPEnabled
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data":
+1}' https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/DHCPEnabled
## Configure MACAddress
### Get
-busctl get-property xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.MACAddress MACAddress
+busctl get-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.MACAddress
+MACAddress
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/MACAddress
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET
+https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/MACAddress
### Set
-NOTE: MAC address should be LOCAL ADMIN MAC (2nd bit of first byte should be on).
+NOTE: MAC address should be LOCAL ADMIN MAC (2nd bit of first byte should be
+on).
-busctl set-property xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.MACAddress MACAddress s "XX:XX:XX:XX:XX:XX"
+busctl set-property xyz.openbmc_project.Network
+/xyz/openbmc_project/network/eth0 xyz.openbmc_project.Network.MACAddress
+MACAddress s "XX:XX:XX:XX:XX:XX"
-curl -c cjar -b cjar -k -H "Content-Type: application/jon" -X PUT -d '{"data": "XX:XX:XX:XX:XX:XX" }' https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/MACAddress
+curl -c cjar -b cjar -k -H "Content-Type: application/jon" -X PUT -d '{"data":
+"XX:XX:XX:XX:XX:XX" }'
+https://<hostname/ip>/xyz/openbmc_project/network/eth0/attr/MACAddress
## Network factory reset
-busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network xyz.openbmc_project.Common.FactoryReset Reset
+busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network
+xyz.openbmc_project.Common.FactoryReset Reset
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data":[] }' https://<hostname/ip>/xyz/openbmc_project/network/action/Reset
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d
+'{"data":[] }' https://<hostname/ip>/xyz/openbmc_project/network/action/Reset
## VLAN
### Create
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data":["eth0",50] }' https://<hostname/ip>/xyz/openbmc_project/network/action/VLAN
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d
+'{"data":["eth0",50] }'
+https://<hostname/ip>/xyz/openbmc_project/network/action/VLAN
### Delete
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X DELETE https://<hostname/ip>/xyz/openbmc_project/network/eth0_50
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X DELETE
+https://<hostname/ip>/xyz/openbmc_project/network/eth0_50
-busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0_50 xyz.openbmc_project.Object.Delete Delete
+busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0_50
+xyz.openbmc_project.Object.Delete Delete
### Enumerate
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://<hostname/ip>/xyz/openbmc_project/network/eth0_50/enumerate
+curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET
+https://<hostname/ip>/xyz/openbmc_project/network/eth0_50/enumerate
### Configure IP on VLAN Interface
diff --git a/yaml/xyz/openbmc_project/Network/IP/Create.interface.yaml b/yaml/xyz/openbmc_project/Network/IP/Create.interface.yaml
index 8623dad..6654b08 100644
--- a/yaml/xyz/openbmc_project/Network/IP/Create.interface.yaml
+++ b/yaml/xyz/openbmc_project/Network/IP/Create.interface.yaml
@@ -4,26 +4,26 @@
description: >
Create ipaddress object.
parameters:
- - name: ProtocolType
- type: enum[xyz.openbmc_project.Network.IP.Protocol]
- description: >
- protocol type can be IPv4 or IPv6 etc.
- - name: Address
- type: string
- description: >
- IP Address.
- - name: PrefixLength
- type: byte
- description: >
- Prefix Length.
- - name: Gateway
- type: string
- description: >
- Gateway Address.
+ - name: ProtocolType
+ type: enum[xyz.openbmc_project.Network.IP.Protocol]
+ description: >
+ protocol type can be IPv4 or IPv6 etc.
+ - name: Address
+ type: string
+ description: >
+ IP Address.
+ - name: PrefixLength
+ type: byte
+ description: >
+ Prefix Length.
+ - name: Gateway
+ type: string
+ description: >
+ Gateway Address.
returns:
- - name: Path
- type: object_path
- description: >
- The path for the created ipaddress object.
+ - name: Path
+ type: object_path
+ description: >
+ The path for the created ipaddress object.
errors:
- - xyz.openbmc_project.Common.Error.InvalidArgument
+ - xyz.openbmc_project.Common.Error.InvalidArgument
diff --git a/yaml/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml b/yaml/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml
index e2f13a7..630ac14 100644
--- a/yaml/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml
+++ b/yaml/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml
@@ -4,18 +4,18 @@
description: >
Create a static neighbor entry.
parameters:
- - name: IPAddress
- type: string
- description: >
- IP Address.
- - name: MACAddress
- type: string
- description: >
- MAC Address.
+ - name: IPAddress
+ type: string
+ description: >
+ IP Address.
+ - name: MACAddress
+ type: string
+ description: >
+ MAC Address.
returns:
- - name: Path
- type: object_path
- description: >
- The path for the created neighbor object.
+ - name: Path
+ type: object_path
+ description: >
+ The path for the created neighbor object.
errors:
- - xyz.openbmc_project.Common.Error.InvalidArgument
+ - xyz.openbmc_project.Common.Error.InvalidArgument
diff --git a/yaml/xyz/openbmc_project/Network/VLAN/Create.interface.yaml b/yaml/xyz/openbmc_project/Network/VLAN/Create.interface.yaml
index 69f4c71..053c172 100644
--- a/yaml/xyz/openbmc_project/Network/VLAN/Create.interface.yaml
+++ b/yaml/xyz/openbmc_project/Network/VLAN/Create.interface.yaml
@@ -4,19 +4,19 @@
description: >
Create VLANInterface Object.
parameters:
- - name: InterfaceName
- type: string
- description: >
- Name of the interface.
- - name: Id
- type: uint32
- description: >
- VLAN Identifier.
+ - name: InterfaceName
+ type: string
+ description: >
+ Name of the interface.
+ - name: Id
+ type: uint32
+ description: >
+ VLAN Identifier.
returns:
- - name: Path
- type: object_path
- description: >
- The path for the created VLAN object.
+ - name: Path
+ type: object_path
+ description: >
+ The path for the created VLAN object.
errors:
- - xyz.openbmc_project.Common.Error.InvalidArgument
- - xyz.openbmc_project.Common.Error.ResourceNotFound
+ - xyz.openbmc_project.Common.Error.InvalidArgument
+ - xyz.openbmc_project.Common.Error.ResourceNotFound