diff options
author | Marcus G K Williams <marcus.williams@intel.com> | 2017-11-10 12:01:49 -0800 |
---|---|---|
committer | Marcus Williams <marcus.williams@intel.com> | 2017-11-10 20:06:25 +0000 |
commit | 7859fd8d47b24fe49c9fcc04c3f5fe9a1894eef6 (patch) | |
tree | 6072b9c29d7098ef169a681c7badbf70a3199b09 /platform-logic/generic-resource-api/src/main/xml | |
parent | f5bd4b3cdc3c129e5263e51b6e2d18bf8fbc3399 (diff) |
Update brg topo activate DG
1. Use get-resource sql plugin
to get wan-brg-ip using wan-brg-mac
2. Changed call to brg-wan-ip-address
to correct variable
3. Added DG get-vgmux-lan-ip and used
new DG in brg topo activate to get
vgmux-lan-ip from md-sal using
consuming-service-instance-id as key
Issue-Id: SDNC-181
Change-Id: I1448cfbcc94f66dc7c2a854d0013ccc443b4e420
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Former-commit-id: bb898c44019de1ce6e47a679b7a038509d901d1e
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
2 files changed, 31 insertions, 2 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml index ff5ba3e3..991d22f8 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml @@ -129,6 +129,17 @@ </return>
</outcome>
</execute>
+ <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='IPADDR' key="SELECT min(ip_addr) ip from DHCP_MAP where mac_addr = $brg-ar.allotted-resource-data.allotted-resource-operation-information.brg-request-input.brg-wan-mac-address" pfx="tmp.brg-wan-ip" ></get-resource>
+ <set>
+ <parameter name='brg-ar.allotted-resource-data.brg-topology.brg-assignments.vbrg-wan-ip' value='`$tmp.brg-wan-ip.ip`' />
+ </set>
+ <set>
+ <parameter name='tmp.ar.consuming-service-instance-id' value='`$allotted-resource-data.brg-topology.allotted-resource-identifiers.consuming-service-instance-id`' />
+ </set>
+ <call module='GENERIC-RESOURCE-API' rpc='get-vgmux-lan-ip' mode='sync' ></call>
+ <set>
+ <parameter name='brg-ar.allotted-resource-data.brg-topology.brg-assignments.vgmux-lan-ip' value='`$tmp.vgmux-lan-ip`' />
+ </set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
<parameter name="source" value="`$prop.honeycomb.url`"/>
<parameter name="outputPath" value="tmp.honeycomb.url"/>
@@ -137,8 +148,8 @@ </execute>
<set>
<parameter name='tmp.tunnel-name' value="`'vxlanTun' + $brg-ar.allotted-resource-data.brg-topology.brg-assignments.vbrg-wan-ip` " />
- <parameter name='tmp.tunnel-dest-ip' value="`$brg-ar.allotted-resource-data.allotted-resource-operation-information.brg-request-input.vgmux-lan-ip` " />
- <parameter name='tmp.tunnel-src-ip' value="`$brg-ar.allotted-resource-data.allotted-resource-operation-information.brg-request-input.brg-wan-ip-address` " />
+ <parameter name='tmp.tunnel-dest-ip' value="`$brg-ar.allotted-resource-data.brg-topology.brg-assignments.vgmux-lan-ip` " />
+ <parameter name='tmp.tunnel-src-ip' value="`$brg-ar.allotted-resource-data.brg-topology.brg-assignments.vbrg-wan-ip` " />
<parameter name='tmp.tunnel-vni' value="`$brg-ar.allotted-resource-data.allotted-resource-operation-information.brg-request-input.vni` " />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_get-vgmux-lan-ip.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_get-vgmux-lan-ip.xml new file mode 100644 index 00000000..563e4bf8 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_get-vgmux-lan-ip.xml @@ -0,0 +1,18 @@ +<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'> + <method rpc='get-vgmux-lan-ip' mode='sync'> + <block atomic="true"> + <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='tunnelxconn-allotted-resources' pfx='tmp.tunnel-ar.data' ></get-resource> + <for index='tunnelidx' start='0' end='`$tmp.tunnel-ar.data.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource_length`' > + <switch test='`$tmp.tunnel-ar.data.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$tunnelidx].allotted-resource-data.tunnelxconn-topology.allotted-resource-identifiers.consuming-service-instance-id == $tmp.ar.consuming-service-instance-id`'> + <outcome value='true'> + <block> + <set> + <parameter name='tmp.vgmux-lan-ip' value='`$tmp.tunnel-ar.data.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$tunnelidx].allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.vgmux-lan-ip`' /> + </set> + </block> + </outcome> + </switch> + </for> + </block> + </method> +</service-logic>
\ No newline at end of file |