Add the following attributes between "complexName" and "resourceVersion":
<xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> |
---|
Save the file, and rebuild the libraries and microservices:
here's my example file: aai_oxm_v11.xmlRun GenTester, using the target dir under aai-resources:
$ cd ~/LF/AAI; java -DAJSC_HOME=/home/jimmy/LF/AAI/resources/aai-resources/target/swm/package/nix/dist_files/opt/app/aai-resources -DBUNDLECONFIG_DIR="bundleconfig" -cp aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/* org.openecomp.aai.dbgen.GenTester There will be lots of output, you should see the following which indicates that resources has picked up the new OXM file: Creating PropertyKey: [new-attribute-for-demo], [String], [SINGLE] [DEV: 2017-Jul-27 13:07:26,856][INFO ][main ]Creating PropertyKey: [new-attribute-for-demo], [String], [SINGLE]No index added for PropertyKey: [new-attribute-for-demo] [DEV: 2017-Jul-27 13:07:27,902][INFO ][main ]No index added for PropertyKey: [new-attribute-for-demo] Creating PropertyKey: [number-attribute-for-demo], [Integer], [SINGLE] [DEV: 2017-Jul-27 13:07:27,904][INFO ][main ]Creating PropertyKey: [number-attribute-for-demo], [Integer], [SINGLE] No index added for PropertyKey: [number-attribute-for-demo] [DEV: 2017-Jul-27 13:07:27,912][INFO ][main ]No index added for PropertyKey: [number-attribute-for-demo] |
---|
Get an example cloud-region object, postman: Cloud-Region Example.postman_collection.json
You should see the new attributes on the example object, as highlighted in the red rectangle above
Copy and paste the example object and PUT it to persist the new attributes. Use this postman collection thru step 15
Run PUT Cloud-Region - missing attr. This will try to PUT the object without the required attribute we defined in the schema, and the response will look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
---|
Adding a new node type. First, add the container under the top-level inventory category. Adding "newWidgets" to "Network" so the URI will be "aai/v11/network/new-widgets/new-widget/{new-widget-name}"
<java-type name="Network"> |
---|
Set up the "NewWidgets" java type:
<java-type name="NewWidgets"> |
---|
Set up the NewWidget java type:
<java-type name="NewWidget"> |
---|
Save the file, and rebuild the libraries and microservices:
here's my example file: aai_oxm_v11.xmlRun GenTester, using the target dir under aai-resources:
$ cd ~/LF/AAI; java -DAJSC_HOME=/home/jimmy/LF/AAI/resources/aai-resources/target/swm/package/nix/dist_files/opt/app/aai-resources -DBUNDLECONFIG_DIR="bundleconfig" -cp aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/* org.openecomp.aai.dbgen.GenTester There will be lots of output, you should see the following which indicates that resources has picked up the new OXM file: Creating PropertyKey: [new-widget-name], [String], [SINGLE] |
---|
Add a new EdgeRule, allowing an edge between the CloudRegion and NewWidget:
{ "from": "cloud-region", "to": "tenant", "label": "has", "direction": "OUT", "multiplicity": "One2Many", "contains-other-v": "${direction}", "delete-other-v": "NONE", "SVC-INFRA": "!${direction}", "prevent-delete": "${direction}" }, { "from": "cloud-region", "to": "new-widget", "label": "has", "direction": "OUT", "multiplicity": "One2Many", "contains-other-v": "NONE", "delete-other-v": "NONE", "SVC-INFRA": "NONE", "prevent-delete": "NONE" }, This means cloud-region connects to new-widget, edge label is "has", it's an OUT edge, one cloud region can have multiple edges to new-widgets, cloud-region does not contain new-widget, new-widget will not be deleted when the cloud-region connected to it is deleted, it is not SVC_INFRA type, and having an edge to a new-widget will not prevent deletion of the cloud-region. |
---|