aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2017-08-31 20:04:36 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-31 20:04:36 +0000
commitc5959920f7b8920dcde45150247ef529221c71a8 (patch)
tree7ecbf09b375da5376b5f2c9516e70bc0d27a4583
parentcacfef39ca7a667babddc7194e8817fc1f815685 (diff)
parent5fd6f294a014124a12de79fb63ad1c9d8bb86766 (diff)
Merge "[AAI-252 Amsterdam] configuration of hostroutes"
-rw-r--r--aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json11
-rw-r--r--aai-schema/src/main/resources/aai_schema/aai_schema_v11.xsd62
-rw-r--r--aai-schema/src/main/resources/oxm/aai_oxm_v11.xml51
3 files changed, 123 insertions, 1 deletions
diff --git a/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json b/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json
index d24acd79..8be2a8cc 100644
--- a/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json
+++ b/aai-core/src/main/resources/dbedgerules/DbEdgeRules_v11.json
@@ -1957,6 +1957,17 @@
"delete-other-v": "NONE",
"SVC-INFRA": "NONE",
"prevent-delete": "NONE"
+ },
+ {
+ "from": "subnet",
+ "to": "host-route",
+ "label": "has",
+ "direction": "OUT",
+ "multiplicity": "One2Many",
+ "contains-other-v": "${direction}",
+ "delete-other-v": "NONE",
+ "SVC-INFRA": "NONE",
+ "prevent-delete": "NONE"
}
]
}
diff --git a/aai-schema/src/main/resources/aai_schema/aai_schema_v11.xsd b/aai-schema/src/main/resources/aai_schema/aai_schema_v11.xsd
index 90c02529..70cfa328 100644
--- a/aai-schema/src/main/resources/aai_schema/aai_schema_v11.xsd
+++ b/aai-schema/src/main/resources/aai_schema/aai_schema_v11.xsd
@@ -4657,6 +4657,60 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="host-route">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(indexedProps="host-route-id",dependentOn="subnet",container="host-routes")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="host-route-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="host-route id")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="route-prefix" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="subnet prefix")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="next-hop" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Could be ip-address, hostname, or service-instance")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="next-hop-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Should be ip-address, hostname, or service-instance to match next-hop")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="host-routes">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:host-route" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
<xs:element name="subnet">
<xs:complexType>
<xs:annotation>
@@ -4749,6 +4803,13 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
</xs:appinfo>
</xs:annotation>
</xs:element>
+ <xs:element name="ip-assignment-direction" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="ip address assignment direction of the subnet")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
<xs:element name="resource-version" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:appinfo>
@@ -4756,6 +4817,7 @@ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
</xs:appinfo>
</xs:annotation>
</xs:element>
+ <xs:element ref="tns:host-routes" minOccurs="0"/>
<xs:element ref="tns:relationship-list" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
diff --git a/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml b/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml
index 51f1ddfd..00769800 100644
--- a/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml
+++ b/aai-schema/src/main/resources/oxm/aai_oxm_v11.xml
@@ -3608,13 +3608,19 @@
<xml-properties>
<xml-property name="description" value="role of the subnet, referenced when assigning IPs" />
</xml-properties>
+ </xml-element>
+ <xml-element java-attribute="ipAssignmentDirection" name="ip-assignment-direction" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="ip address assignment direction of the subnet" />
+ </xml-properties>
</xml-element>
<xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
<xml-properties>
<xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." />
</xml-properties>
</xml-element>
- <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v11.RelationshipList" />
+ <xml-element java-attribute="hostRoutes" name="host-routes" type="inventory.aai.onap.org.v11.HostRoutes" />
+ <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v11.RelationshipList" />
</java-attributes>
<xml-properties>
<xml-property name="indexedProps" value="subnet-id,subnet-name" />
@@ -5691,5 +5697,48 @@
<xml-property name="container" value="sriov-pfs" />
</xml-properties>
</java-type>
+
+ <java-type name="HostRoutes">
+ <xml-root-element name="host-routes" />
+ <java-attributes>
+ <xml-element container-type="java.util.ArrayList" java-attribute="hostRoute" name="host-route" type="inventory.aai.onap.org.v11.HostRoute" />
+ </java-attributes>
+ </java-type>
+ <java-type name="HostRoute">
+ <xml-root-element name="host-route" />
+ <java-attributes>
+ <xml-element java-attribute="hostRouteId" name="host-route-id" required="true" type="java.lang.String" xml-key="true">
+ <xml-properties>
+ <xml-property name="description" value="host-route id" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="routePrefix" name="route-prefix" required="true" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="subnet prefix" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="nextHop" name="next-hop" required="true" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Could be ip-address, hostname, or service-instance" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="nextHopType" name="next-hop-type" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Should be ip-address, hostname, or service-instance to match next-hop" />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String">
+ <xml-properties>
+ <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." />
+ </xml-properties>
+ </xml-element>
+ <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v11.RelationshipList" />
+ </java-attributes>
+ <xml-properties>
+ <xml-property name="indexedProps" value="host-route-id" />
+ <xml-property name="dependentOn" value="subnet" />
+ <xml-property name="container" value="host-routes" />
+ </xml-properties>
+ </java-type>
</java-types>
</xml-bindings>