Network: define interface for IP address

Change-Id: Id4d07d36f7471b30249977f0a53aa6d1680d04ce
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/xyz/openbmc_project/Network/IP.interface.yaml b/xyz/openbmc_project/Network/IP.interface.yaml
new file mode 100644
index 0000000..fcfb64c
--- /dev/null
+++ b/xyz/openbmc_project/Network/IP.interface.yaml
@@ -0,0 +1,42 @@
+description: >
+    This defines an IP address.
+
+# TODO Fix it through https://github.com/openbmc/openbmc/issues/1438
+# creatable: true
+
+properties:
+    - name: Address
+      type: string
+      description: >
+          The value of this property shall be an IP address assigned to
+          the ethernet interface.
+    - name: PrefixLength
+      type: byte
+      description: >
+          This is the number of network bits in the ipaddress.
+    - name: Origin
+      type: enum[self.AddressOrigin]
+      description: >
+          This indicates how the address was determined.
+    - name: Gateway
+      type: string
+      description: >
+          This is the IP gateway for this address.
+
+enumerations:
+    - name: AddressOrigin
+      description: >
+          Possible IP address origin types.
+      values:
+        - name: Static
+          description: >
+              Static address configured by the server.
+        - name: DHCP
+          description: >
+              Address is provided by a DHCP service.
+        - name: LinkLocal
+          description: >
+              Address is valid only for this network segment.
+        - name: SLAAC
+          description: >
+              Address is provided by a Stateless Address Autoconfiguration.