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 10
Run PUT Cloud-Region - missing attr. This will try to PUT the object without the required attribute we defined in the schema, and the respoonse 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"
<java-type name="Network"> |
---|
Set up the "NewWidgets" java type:
<java-type name="NewWidgets"> |
---|
Set up the NewWidget java type:
<java-type name="NewWidget"> |
---|