From 3fa2a729acf954efb61445ddd187bb41d34f2c7c Mon Sep 17 00:00:00 2001 From: Jin Li Date: Thu, 4 Jan 2018 15:24:50 -0800 Subject: [PATCH] Add ipaddress to BaseServiceBinding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we need to add ip address when we are doing bindings, we should add ip address as an attribute to BaseServiceBinding. By adding it to the BaseServiceBinding, we will enforce all bindings to have a consistent name across all services. For example, in ietf-sfc we have both sfDataPlaneLocator and sffDataPlaneLocator which extends BaseServiceBinding.They named their ip address attribute “ip”. For net-l3vpn, they have vpnBinding extends BaseServiceBinding, and it name its ip address attribute “ipaddress”. This inconsistence in naming the ip attribute causes some troubles in auto generating the backend. Change-Id: I9f3f53937ae25e5e1dbfc5939db18d476c137f86 --- gluon/models/base/base.yaml | 5 +++++ gluon/models/ietf-sfc/api.yaml | 9 --------- gluon/models/net-l3vpn/api.yaml | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/gluon/models/base/base.yaml b/gluon/models/base/base.yaml index f6e296e..0190196 100644 --- a/gluon/models/base/base.yaml +++ b/gluon/models/base/base.yaml @@ -132,6 +132,11 @@ objects: type: uuid required: true description: "Pointer to Service instance" + ipaddress: + type: string + length: 16 + description: "IP Address of port" + format: ipv4 policies: create: role: "rule:admin_or_owner" diff --git a/gluon/models/ietf-sfc/api.yaml b/gluon/models/ietf-sfc/api.yaml index 3e9613a..6babc53 100755 --- a/gluon/models/ietf-sfc/api.yaml +++ b/gluon/models/ietf-sfc/api.yaml @@ -126,11 +126,6 @@ objects: type: string length: 255 description: "Name of this data plane locator" - ip: - type: string - format: ipv4 - length: 16 - description: "Data plane IP address" l4_port: type: integer format: int32 @@ -154,10 +149,6 @@ objects: plural_name: sffdataplanelocator extends: BaseServiceBinding attributes: - ip: - type: string - format: ipv4 - length: 16 l4_port: type: integer format: int32 diff --git a/gluon/models/net-l3vpn/api.yaml b/gluon/models/net-l3vpn/api.yaml index 68750b2..2d33b02 100644 --- a/gluon/models/net-l3vpn/api.yaml +++ b/gluon/models/net-l3vpn/api.yaml @@ -52,11 +52,6 @@ objects: type: VpnService interface_id: # Override from base object for specific Interface type type: Interface - ipaddress: - type: string - length: 16 - description: "IP Address of port" - format: ipv4 subnet_prefix: type: integer description: "Subnet mask"