diff options
author | 2021-04-23 13:02:22 -0400 | |
---|---|---|
committer | 2021-04-23 15:48:50 -0400 | |
commit | bf2bea4aaee161d82c8093f8b723f0fd9b57a115 (patch) | |
tree | 0f784c234b444f0479dad7b3eb6fb3c1e502cd6d /ms/gra/gra-app/src/test/resources/svclogic/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml | |
parent | 5c4184f9312d00166dea77b5a16ae400c669f473 (diff) |
Refactor GRA to separate docker creation from application code
Refactor GRA so that application jar is created in a separate
maven module from the docker build.
Issue-ID: SDNC-1527
Change-Id: I4a9af7fe4df14faaf683588bc2567fcc3346886e
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/gra/gra-app/src/test/resources/svclogic/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml')
-rw-r--r-- | ms/gra/gra-app/src/test/resources/svclogic/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml | 699 |
1 files changed, 699 insertions, 0 deletions
diff --git a/ms/gra/gra-app/src/test/resources/svclogic/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml b/ms/gra/gra-app/src/test/resources/svclogic/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml new file mode 100644 index 0000000..49436b4 --- /dev/null +++ b/ms/gra/gra-app/src/test/resources/svclogic/GENERIC-RESOURCE-API_eipam-create-network-role-pool.xml @@ -0,0 +1,699 @@ +<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='eipam-create-network-role-pool' mode='sync'>
+ <block atomic='true'>
+ <set>
+ <parameter name="tmp.eipam-error" value="false" />
+ <parameter name="tmp.create-v4-pool-flag" value="N" />
+ <parameter name="tmp.create-v6-pool-flag" value="N" />
+ <parameter name='eipam-ip-block.plans_length' value='0' />
+ <parameter name="eipam-pool.v4.pre-existing" value="false"/>
+ <parameter name="eipam-pool.v6.pre-existing" value="false"/>
+ <parameter name="tmp.v4-level1-key-name" value="LOCATION_CLLI8:CLOUD_REGION_ID" />
+ <parameter name="tmp.v4-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+ <parameter name="tmp.v6-level1-key-name" value="LOCATION_CLLI8:CLOUD_REGION_ID" />
+ <parameter name="tmp.v6-level2-key-name" value="NETWORK_ROLE:NETWORK_ID" />
+ </set>
+ <switch test="`$tmp.region`">
+ <outcome value="USA">
+ <set>
+ <parameter name="tmp.region" value="US" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$network-model.use-ipv4`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value='1'>
+ <get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * FROM EIPAM_IP_POOLS where plan_name = $network-model.eipam-v4-address-plan and level = 1 and key_value = $tmp.level1-key-value ;"
+ pfx='tmp.eipam-pool-row'>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_POOLS failed." />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="field5" value="`$tmp.level1-key-value`"/>
+ <parameter name="field6" value="Level 1 already exists, SKIP."/>
+ <parameter name="field7" value="`$tmp.eipam-pool-row.pool-id`"/>
+ </record>
+ <set>
+ <parameter name="eipam-pool.v4.pre-existing" value="true"/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value="not-found">
+ <block atomic='true'>
+ <switch test="`$network-model.eipam-v4-address-plan`">
+ <outcome value="AIC_ATM_UNPROTECTED_V4">
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_UNPROTECTED_V4">
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="tmp.qip-pool" value="`'DP-U ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PRIVATE_V4">
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="tmp.qip-pool" value="`'DP-Private ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_ATM_PROTECTED_V4">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PROTECTED_V4">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'DP-P ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_AIM_LANDING_NETWORK_V4">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V4 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return>
+ </outcome>
+ </switch>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v4-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v4-pool-flag" value="Y" />
+ <parameter name="tmp.v4-qip-pool" value="`$tmp.qip-pool`" />
+ </set>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return>
+ </outcome>
+ <outcome value='2'>
+ <set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v4-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+ <parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+ <parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+ <parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+ <parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+ </record>
+ <set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
+ </outcome>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return>
+ </outcome>
+ <outcome value='2'>
+ <block atomic='true'>
+ <switch test="`$network-model.eipam-v4-address-plan`">
+ <outcome value="AIC_ATM_UNPROTECTED_V4">
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_UNPROTECTED_V4">
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="tmp.qip-pool" value="`'DP-U ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PRIVATE_V4">
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="tmp.qip-pool" value="`'DP-Private ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_ATM_PROTECTED_V4">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PROTECTED_V4">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'DP-P ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_AIM_LANDING_NETWORK_V4">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V4 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return>
+ </outcome>
+ </switch>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v4-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v4-pool-flag" value="Y" />
+ <parameter name="tmp.v4-qip-pool" value="`$tmp.qip-pool`" />
+ </set>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return>
+ </outcome>
+ <outcome value='2'>
+ <set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v4-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+ <parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+ <parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+ <parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+ <parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+ </record>
+ <set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value=""></outcome>
+ <outcome value='N'></outcome>
+ </switch>
+ <switch test="`$network-model.use-ipv6`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value='1'>
+ <get-resource
+ plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource='SQL'
+ key="SELECT * FROM EIPAM_IP_POOLS where plan_name = $network-model.eipam-v6-address-plan and level = 1 and key_value = $tmp.level1-key-value ;"
+ pfx='tmp.eipam-pool-row'>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Query to DB table EIPAM_IP_POOLS failed." />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic='true'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="field5" value="`$tmp.level1-key-value`"/>
+ <parameter name="field6" value="Level 1 already exists, SKIP."/>
+ <parameter name="field7" value="`$tmp.eipam-pool-row.pool-id`"/>
+ </record>
+ <set>
+ <parameter name="eipam-pool.v6.pre-existing" value="true"/>
+ </set>
+ </block>
+ </outcome>
+ <outcome value="not-found">
+ <block atomic='true'>
+ <switch test="`$network-model.eipam-v6-address-plan`">
+ <outcome value="AIC_ATM_UNPROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_AIM_LANDING_NETWORK_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_ATM_PROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_UNPROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-U-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PRIVATE_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-Private-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-P-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return>
+ </outcome>
+ </switch>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v6-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v6-pool-flag" value="Y" />
+ <parameter name="tmp.v6-qip-pool" value="`$tmp.qip-pool`" />
+ </set>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return>
+ </outcome>
+ <outcome value='2'>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v6-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+ <parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+ <parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+ <parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+ <parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+ </record>
+ <set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" />
+ </set>
+ </block>
+ </outcome>
+ </get-resource>
+ </outcome>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return>
+ </outcome>
+ <outcome value='2'>
+ <block atomic='true'>
+ <switch test="`$network-model.eipam-v6-address-plan`">
+ <outcome value="AIC_ATM_UNPROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-U-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_AIM_LANDING_NETWORK_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-AIM-LANDING-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_ATM_PROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'ATM-P-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_UNPROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-U-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PRIVATE_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-Private-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value="AIC_DATA_PLANE_PROTECTED_V6">
+ <set>
+ <parameter name="tmp.qip-pool" value="`'AIC-DP-P-V6 ' + $tmp.region`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="EIPAM Address Plan is not valid." />
+ </return>
+ </outcome>
+ </switch>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].allocate-subnet-flag" value="N"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value="`$tmp.qip-pool`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests_length" value="1"/>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="1"/>
+ <!-- Level 1 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name" value="`$tmp.v6-level1-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value" value="`$tmp.level1-key-value`"/>
+ <parameter name="tmp.create-v6-pool-flag" value="Y" />
+ <parameter name="tmp.v6-qip-pool" value="`$tmp.qip-pool`" />
+ </set>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="Please set the eipam-ip-block.level for appropriate EIPAM request." />
+ </return>
+ </outcome>
+ <outcome value='2'>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <set>
+ <!-- Number of Pool Levels -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools_length" value="`$eipam-ip-block.level`"/>
+ <!-- Level 2 -->
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].parent-pool" value=""/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name" value="`$tmp.v6-level2-key-name`"/>
+ <parameter name="eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value" value="`$tmp.level2-key-value`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'></outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].plan-name`"/>
+ <parameter name="field5" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-name`"/>
+ <parameter name="field6" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[0].key-value`"/>
+ <parameter name="field7" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-name`"/>
+ <parameter name="field8" value="`$eipam-ip-block.plans[$eipam-ip-block.plans_length].requests[0].pools[1].key-value`"/>
+ </record>
+ <set>
+ <parameter name="eipam-ip-block.plans_length" value="`$eipam-ip-block.plans_length + 1`" />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value=""></outcome>
+ <outcome value='N'></outcome>
+ </switch>
+ <switch test="`$tmp.create-v4-pool-flag`">
+ <outcome value='Y'>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="createPool">
+ <outcome value='success'></outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while creating pool in EIPAM." />
+ </return>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='N'>
+ <switch test="`$tmp.create-v6-pool-flag`">
+ <outcome value='Y'>
+ <!--subnet and subnet_keys are deleted in the EIPAMPlugin-->
+ <execute plugin="com.att.sdnctl.sli.plugin.eipam.EIPAMPlugin" method="createPool">
+ <outcome value='success'></outcome>
+ <outcome value='failure'>
+ <return status="failure">
+ <parameter name="tmp.eipam-error" value="true" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="An error occured while creating pool in EIPAM." />
+ </return>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='N'></outcome>
+ </switch>
+ </outcome>
+ </switch>
+ <switch test="`$network-model.use-ipv4`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <switch test="`$tmp.create-v4-pool-flag`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value='1'>
+ <save
+ plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v4-level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ,
+ plan_name = $network-model.eipam-v4-address-plan ,
+ address_family = $network-model.ipv4-ip-version ,
+ parent_pool = $tmp.v4-qip-pool ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v4pool-row'>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+ </return>
+ </outcome>
+ <outcome value='Other'></outcome>
+ <outcome value='Other'></outcome>
+ </save>
+ </outcome>
+ <outcome value='2'>
+ <save
+ plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v4-level2-key-name ,
+ key_value = $tmp.level2-key-value ,
+ level = 2 ,
+ plan_name = $network-model.eipam-v4-address-plan ,
+ address_family = $network-model.ipv4-ip-version ,
+ parent_pool = $tmp.level1-key-value ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v4pool-row'>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+ </return>
+ </outcome>
+ <outcome value='Other'></outcome>
+ <outcome value='Other'></outcome>
+ </save>
+ </outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$network-model.eipam-v4-address-plan`"/>
+ <parameter name="field5" value="`$tmp.v4-level1-key-name`"/>
+ <parameter name="field6" value="`$tmp.level1-key-value`"/>
+ <parameter name="field7" value="`$tmp.v4-level2-key-name`"/>
+ <parameter name="field8" value="`$tmp.level2-key-value`"/>
+ <parameter name="field9" value="`$network-model.network-role`"/>
+ <parameter name="field10" value="`$tmp.network-id`"/>
+ <parameter name="field11" value="Saving to EIPAM_IP_POOLS table."/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='N'></outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value=""></outcome>
+ <outcome value='N'></outcome>
+ </switch>
+ <switch test="`$network-model.use-ipv6`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <switch test="`$tmp.create-v6-pool-flag`">
+ <outcome value='Y'>
+ <block atomic='true'>
+ <switch test="`$eipam-ip-block.level`">
+ <outcome value='1'>
+ <save
+ plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v6-level1-key-name ,
+ key_value = $tmp.level1-key-value ,
+ level = 1 ,
+ plan_name = $network-model.eipam-v6-address-plan ,
+ address_family = $network-model.ipv6-ip-version ,
+ parent_pool = $tmp.v6-qip-pool ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v6pool-row'>
+ <outcome value='Other'></outcome>
+ <outcome value='Other'></outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+ </return>
+ </outcome>
+ </save>
+ </outcome>
+ <outcome value='2'>
+ <save
+ plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource'
+ resource='SQL'
+ key="INSERT EIPAM_IP_POOLS
+ SET
+ key_name = $tmp.v6-level2-key-name ,
+ key_value = $tmp.level2-key-value ,
+ level = 2 ,
+ plan_name = $network-model.eipam-v6-address-plan ,
+ address_family = $network-model.ipv6-ip-version ,
+ parent_pool = $tmp.level1-key-value ,
+ service_instance_id = $network-topology-operation-input.service-information.service-instance-id ,
+ network_id = $tmp.network-id ; "
+ force='true'
+ pfx='pfx.eipam-v6pool-row'>
+ <outcome value='Other'></outcome>
+ <outcome value='Other'></outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value='failed to update EIPAM_IP_POOLS .' />
+ </return>
+ </outcome>
+ </save>
+ </outcome>
+ </switch>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="network-topology-operation"/>
+ <parameter name="field3" value="eipam-create-network-role-pool"/>
+ <parameter name="field4" value="`$network-model.eipam-v6-address-plan`"/>
+ <parameter name="field5" value="`$tmp.v6-level1-key-name`"/>
+ <parameter name="field6" value="`$tmp.level1-key-value`"/>
+ <parameter name="field7" value="`$tmp.v6-level2-key-name`"/>
+ <parameter name="field8" value="`$tmp.level2-key-value`"/>
+ <parameter name="field9" value="`$network-model.network-role`"/>
+ <parameter name="field10" value="`$tmp.network-id`"/>
+ <parameter name="field11" value="Saving to EIPAM_IP_POOLS table."/>
+ </record>
+ </block>
+ </outcome>
+ <outcome value='N'></outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value=""></outcome>
+ <outcome value='N'></outcome>
+ </switch>
+ <return status='success'>
+ <parameter name="error-code" value="200" />
+ </return>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |