aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_assign-vlan-tags.xml
blob: f23891cf8ef6cd6bb2a0c11c68c34acbfa39649e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
#============LICENSE_START========================================================
# ================================================================================
# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
# Copyright © 2018 Amdocs, Bell Canada
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================

#################################################################
# Global configuration defaults.
#################################################################
global:
  nodePortPrefix: 302
  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiZGNhZUBkY2FlLm9uYXAub3JnIiwiYXV0aCI6IlpHOWphMlZ5T21SdlkydGxjZz09In19
  readinessRepository: oomk8s
  readinessImage: readiness-check:1.1.0
  loggingRepository: docker.elastic.co
  loggingImage: beats/filebeat:5.5.0

config:
  logstashServiceName: log-ls
  logstashPort: 5044
  # Addresses of other ONAP entities
  address:
    consul:
      host: consul-server
      port: 8500

#################################################################
# Application configuration defaults.
#################################################################
# application image
repository: nexus3.onap.org:10001
image: onap/org.onap.dcaegen2.deployments.cm-container:1.3.0
pullPolicy: Always

# probe configuration parameters
liveness<
<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='assign-vlan-tags' mode='sync'>
        <block atomic="true">
            <set>
                <parameter name='tmp.vlan-vnics.' value='' />
            </set>
            <set>
                <parameter name='tmp.vlan-vnics.'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[0].vnic-groups.vnic-group[0].vlan-vnics.`' />
            </set>
            <set>
                <parameter name='total-subs' value='`$get-data-from-policy-output.precreate-sub-intf-num`' />
            </set>
            <switch test='`$total-subs &gt; ( $tmp.vlan-vnics.vlan-vnic_length * $get-data-from-policy-output.max-num-sub-intf )`'>
                <outcome value='true'>
                    <set>
                        <parameter name='total-subs' value='`$tmp.vlan-vnics.vlan-vnic_length * $get-data-from-policy-output.max-num-sub-intf`' />
                    </set>
                </outcome>
            </switch>
            <set>
                <parameter name='cur-tag-id' value='`$get-data-from-policy-output.vlan-tag-start + $get-data-from-policy-output.vlan-tag-offset`' />
            </set>
            <set>
                <parameter name='sub-index' value='0' />
                <parameter name='vnic-index' value='0' />
            </set>
            <while test='`$total-subs &gt; 0`'>
                <block atomic="true">
                    <set>
                        <parameter name='tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].vlan-tag-id'
  value='`$cur-tag-id`' />
                    </set>
                    <set>
                        <parameter name='tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data_length'
  value='`$sub-index + 1`' />
                    </set>
                    <set>
                        <parameter name='cur-tag-id' value='`$cur-tag-id + 1`' />
                    </set>
                    <set>
                        <parameter name='vnic-index' value='`$vnic-index + 1`' />
                    </set>
                    <switch test='`$vnic-index == $tmp.vlan-vnics.vlan-vnic_length`'>
                        <outcome value='true'>
                            <block>
                                <set>
                                    <parameter name='vnic-index' value='0' />
                                </set>
                                <set>
                                    <parameter name='sub-index' value='`$sub-index + 1`' />
                                </set>
                            </block>
                        </outcome>
                    </switch>
                    <set>
                        <parameter name='total-subs' value='`$total-subs - 1`' />
                    </set>
                </block>
            </while>
            <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
  resource="instance-groups" 
  key="instance-group.instance-group-function = $db.group-uuids[$group-index].network-collection-function
    AND instance-group.instance-group-type = 'L3-NETWORK'"
  pfx='aai.instance-group' local-only='false' >
                <outcome value='not-found'>
                    <return status='failure'>
                        <parameter name='ack-final' value='Y'/>
                        <parameter name="error-code" value="500" />
                        <parameter name="error-message"
      value="`'Unable to find AAI instance-group for instance-group-function '
        + $db.group-uuids[$group-index].network-collection-function
        + ' and instance-group-type L3-NETWORK'`" />
                    </return>
                </outcome>
                <outcome value='failure'>
                    <return status='failure'>
                        <parameter name='ack-final' value='Y'/>
                        <parameter name="error-code" value="500" />
                        <parameter name="error-message"
      value="`'System error getting AAI instance-group for instance-group-function '
        + $db.group-uuids[$group-index].network-collection-function
        + ' and instance-group-type L3-NETWORK'`" />
                    </return>
                </outcome>
            </get-resource>
            <set>
                <parameter name='found-instance-group' value='false' />
            </set>
            <for index='ig-index' start='0' end='`$aai.instance-group.instance-group_length`' >
                <for index='rel-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship_length`' >
                    <for index='reldata-index' start='0' end='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data_length`' >
                        <switch test="`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-key
  == 'service-instance.service-instance-id'`">
                            <outcome value='true'>
                                <switch test='`$aai.instance-group.instance-group[$ig-index].relationship-list.relationship[$rel-index].relationship-data[$reldata-index].relationship-value
  == $service-data.service-information.service-instance-id`'>
                                    <outcome value='true'>
                                        <block>
                                            <set>
                                                <parameter name='found-instance-group' value='true' />
                                            </set>
                                            <set>
                                                <parameter name='aai-ig-index' value='`$ig-index`' />
                                            </set>
                                            <break/>
                                        </block>
                                    </outcome>
                                </switch>
                            </outcome>
                        </switch>
                    </for>
                </for>
            </for>
            <switch test='`$found-instance-group`'>
                <outcome value='false'>
                    <return status='failure'>
                        <parameter name='ack-final' value='Y'/>
                        <parameter name="error-code" value="500" />
                        <parameter name="error-message"
      value="`'Unable to find AAI instance-group for instance-group-function '
        + $db.group-uuids[$group-index].vfc-instance-group-function
        + ' and instance-group-type VNFC'`" />
                    </return>
                </outcome>
            </switch>
            <set>
                <parameter name='network-instance-group-id' value='`$aai.instance-group.instance-group[$aai-ig-index].id`' />
                <parameter name='tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-id'
  value='`$aai.instance-group.instance-group[$aai-ig-index].id`' />
            </set>
            <set>
                <parameter name='network-instance-group-index' value='-1' />
            </set>
            <for silentFailure='true' index='nig-index' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
                <switch test='`$network-instance-group-id
== $service-data.network-instance-groups.network-instance-group[$nig-index].network-instance-group-id`'>
                    <outcome value='true'>
                        <block>
                            <set>
                                <parameter name='network-instance-group-index' value='`$nig-index`' />
                            </set>
                            <break/>
                        </block>
                    </outcome>
                </switch>
            </for>
            <switch test='`$network-instance-group-index`'>
                <outcome value='-1'>
                    <return status='failure'>
                        <parameter name='error-code' value='500' />
                        <parameter name='error-message' value="`'Unable to find network instance group ID '
  + $network-instance-group-id
  + ' in network-instance-groups'`" />
                    </return>
                </outcome>
            </switch>
            <for index='vnic-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic_length`' >
                <for index='sub-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data_length`' >
                    <block atomic="true">
                        <set>
                            <parameter name='network-index' value='-1' />
                            <parameter name='unassigned-network-index' value='-1' />
                        </set>
                        <for index='n-index' start='0' end='`$service-data.network-instance-groups.network-instance-group[$network-instance-group-index].networks.network_length`' >
                            <switch test='`$tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].vlan-tag-id
  == $service-data.network-instance-groups.network-instance-group[$network-instance-group-index].networks.network[$n-index].vlan-tag-id`'>
                                <outcome value='true'>
                                    <block>
                                        <set>
                                            <parameter name='network-index' value='`$n-index`' />
                                        </set>
                                        <break/>
                                    </block>
                                </outcome>
                                <outcome value='false'>
                                    <switch test="`$unassigned-network-index`">
                                        <outcome value='-1'>
                                            <switch test='`$service-data.network-instance-groups.network-instance-group[$network-instance-group-index].networks.network[$n-index].network-status`'>
                                                <outcome value='unassigned'>
                                                    <set>
                                                        <parameter name='unassigned-network-index' value='`$n-index`' />
                                                    </set>
                                                </outcome>
                                            </switch>
                                        </outcome>
                                    </switch>
                                </outcome>
                            </switch>
                        </for>
                        <switch test='`$network-index`'>
                            <outcome value='-1'>
                                <switch test='`$unassigned-network-index`'>
                                    <outcome value='-1'>
                                        <return status='failure'>
                                            <parameter name='error-code' value='500' />
                                            <parameter name='error-message' value="L3-network not found" />
                                        </return>
                                    </outcome>
                                    <outcome value='Other'>
                                        <block>
                                            <set>
                                                <parameter name='tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].network-id'
  value='`$service-data.network-instance-groups.network-instance-group[$network-instance-group-index].networks.network[$unassigned-network-index].network-id`' />
                                            </set>
                                            <set>
                                                <parameter name='service-data.network-instance-groups.network-instance-group[$network-instance-group-index].networks.network[$unassigned-network-index].vlan-tag-id'
  value='`$tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].vlan-tag-id`' />
                                                <parameter name='service-data.network-instance-groups.network-instance-group[$network-instance-group-index].networks.network[$unassigned-network-index].network-status'
  value='assigned' />
                                            </set>
                                        </block>
                                    </outcome>
                                </switch>
                            </outcome>
                            <outcome value='Other'>
                                <set>
                                    <parameter name='tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].network-id'
  value='`$service-data.network-instance-groups.network-instance-group[$network-instance-group-index].networks.network[$network-index].network-id`' />
                                </set>
                            </outcome>
                        </switch>
                    </block>
                </for>
            </for>
            <for index='vnic-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic_length`' >
                <for index='sub-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data_length`' >
                    <block atomic="true">
                        <for index='n-index' start='0' end='`$service-data.networks.network_length`' >
                            <switch test='`$tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].network-id
  == $service-data.networks.network[$n-index].network-id`'>
                                <outcome value='true'>
                                    <block>
                                        <set>
                                            <parameter name='tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].network-name'
  value='`$service-data.networks.network[$n-index].network-data.network-topology.network-topology-identifier-structure.network-name`' />
                                            <parameter name='tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].network-role'
  value='`$service-data.networks.network[$n-index].network-data.network-topology.network-topology-identifier-structure.network-role`' />
                                        </set>
                                        <break/>
                                    </block>
                                </outcome>
                            </switch>
                        </for>
                    </block>
                </for>
            </for>
            <switch test='`$tmp.vlan-vnics.vlan-vnic[$vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].network-name`'>
                <outcome value=''>
                    <return status='failure'>
                        <parameter name='error-code' value='500' />
                        <parameter name='error-message' value="`'Failed to find a network name for network id '
  + $service-data.networks.network[$n-index].network-id`" />
                    </return>
                </outcome>
            </switch>
            <set>
                <parameter name='found-collection' value='false' />
            </set>
            <for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection_length`' >
                <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$idx].network-instance-group-function
  == $tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-function`'>
                    <outcome value='true'>
                        <block>
                            <set>
                                <parameter name='found-collection' value='true' />
                            </set>
                            <set>
                                <parameter name='vnc-index' value='`$idx`' />
                            </set>
                            <break/>
                        </block>
                    </outcome>
                </switch>
            </for>
            <switch test='`$found-collection`'>
                <outcome value='false'>
                    <return status='failure'>
                        <parameter name='error-code' value='500' />
                        <parameter name='error-message' value="`'Unable to find vnf-network-collection for network-instance-group-function '
  + $tmp.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].network-instance-group-function`" />
                    </return>
                </outcome>
            </switch>
            <set>
                <parameter name='found-network-instance-group' value='false' />
            </set>
            <for index='idx' start='0' end='`$service-data.network-instance-groups.network-instance-group_length`' >
                <switch test='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[0].vnic-groups.vnic-group[0].network-instance-group-id
  == $service-data.network-instance-groups.network-instance-group[$idx].network-instance-group-id`'>
                    <outcome value='true'>
                        <block>
                            <set>
                                <parameter name='found-network-instance-group' value='true' />
                            </set>
                            <set>
                                <parameter name='nig-index' value='`$idx`' />
                            </set>
                            <break/>
                        </block>
                    </outcome>
                </switch>
            </for>
            <switch test='`$found-network-instance-group`'>
                <outcome value='false'>
                    <return status='failure'>
                        <parameter name='error-code' value='500' />
                        <parameter name='error-message' value="`'Unable to find network-instance-group for network-instance-group-id '
  + $tmp.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].network-instance-group-id`" />
                    </return>
                </outcome>
            </switch>
            <for silentFailure='true' index='subnet-index' start='0'
  end='`$service-data.network-instance-groups.network-instance-group[$nig-index].subnets_length`' >
                <switch test='`$service-data.network-instance-groups.network-instance-group[$nig-index].subnets[$subnet-index].ip-version`'>
                    <outcome value='ipv4'>
                        <block>
                            <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$vnc-index].vnf-floating-ip.ip-addresses.vipv4-address`'>
                                <outcome value=''>
                                    <block>
                                        <set>
                                            <parameter name='tmp.vt-ip.network-instance-group-id'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].network-instance-group-id`' />
                                            <parameter name='tmp.vt-ip.network-instance-group-function'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].network-instance-group-function`' />
                                            <parameter name='tmp.vt-ip.nf-role'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`' />
                                            <parameter name='tmp.vt-ip.vm-type'
  value='`$db.group-uuids[$group-index].vm-type`' />
                                            <parameter name='tmp.vt-ip.vnfc-name'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnfc-name`' />
                                            <parameter name='tmp.vt-ip.type'
  value='VIP' />
                                            <parameter name='tmp.vt-ip.vf-module-id'
  value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
                                            <parameter name='tmp.vt-ip.ip-version'
  value='ipv4' />
                                            <parameter name='tmp.vt-ip.network-id'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].vlan-vnics.vlan-vnic[0].vnic-sub-interface.sub-interface-network-data[0].network-id`' />
                                        </set>
                                        <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-ip-addresses' mode='sync' >
                                            <outcome value='failure'>
                                                <return status='failure'></return>
                                            </outcome>
                                        </call>
                                        <set>
                                            <parameter name='eipam-ip-block.plans_length' value='2' />
                                            <parameter name='eipam-ip-block.plans[0].plan-name' value='plan-1' />
                                            <parameter name='eipam-ip-block.plans[0].requests_length' value='1' />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].client-key'
  value='vm-type-1|zmtn6nf-code-16code-1001|network-role-1|subnet-role-1|FIXED|4|1' />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].ip-type' value='FIXED' />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].ip-prefix' value="`'34.52.87.1' + $counter`" />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].ip-version' value='4' />
                                        </set>
                                        <set>
                                            <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$vnc-index].vnf-floating-ip.ip-addresses.vipv4-address'
  value='`$eipam-ip-block.plans[0].requests[0].ip-prefix`' />
                                        </set>
                                    </block>
                                </outcome>
                            </switch>
                            <for index='vlan-vnic-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic_length`' >
                                <for index='sub-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic[$vlan-vnic-index].vnic-sub-interfaces.sub-interface-network-data_length`' >
                                    <set>
                                        <parameter name='tmp.vlan-vnics.vlan-vnic[$vlan-vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].floating-ips.floating-ip-v4'
  value='`$eipam-ip-block.plans[0].requests[0].ip-prefix`' />
                                    </set>
                                </for>
                            </for>
                        </block>
                    </outcome>
                    <outcome value='ipv6'>
                        <block>
                            <switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$vnc-index].vnf-floating-ip.ip-addresses.vipv6-address`'>
                                <outcome value=''>
                                    <block>
                                        <set>
                                            <parameter name='tmp.vt-ip.network-instance-group-id'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].network-instance-group-id`' />
                                            <parameter name='tmp.vt-ip.network-instance-group-function'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].network-instance-group-function`' />
                                            <parameter name='tmp.vt-ip.nf-role'
  value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role`' />
                                            <parameter name='tmp.vt-ip.vm-type'
  value='`$db.group-uuids[$group-index].vm-type`' />
                                            <parameter name='tmp.vt-ip.vnfc-name'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnfc-name`' />
                                            <parameter name='tmp.vt-ip.type'
  value='VIP' />
                                            <parameter name='tmp.vt-ip.vf-module-id'
  value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
                                            <parameter name='tmp.vt-ip.ip-version'
  value='ipv6' />
                                            <parameter name='tmp.vt-ip.network-id'
  value='`$tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[$vnfc-index].vnic-groups.vnic-group[$vnic-group-index].vlan-vnics.vlan-vnic[0].vnic-sub-interface.sub-interface-network-data[0].network-id`' />
                                        </set>
                                        <call module='GENERIC-RESOURCE-API' rpc='vf-module-topology-vlan-tagging-ip-addresses' mode='sync' >
                                            <outcome value='failure'>
                                                <return status='failure'></return>
                                            </outcome>
                                        </call>
                                        <set>
                                            <parameter name='eipam-ip-block.plans_length' value='2' />
                                            <parameter name='eipam-ip-block.plans[0].plan-name' value='plan-1' />
                                            <parameter name='eipam-ip-block.plans[0].requests_length' value='6' />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].client-key'
  value='vm-type-1|zmtn6nf-code-16code-1001|network-role-1|subnet-role-1|FIXED|4|1' />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].ip-type' value='FIXED' />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].ip-prefix' value="`'cafe:1111' + $counter`" />
                                            <parameter name='eipam-ip-block.plans[0].requests[0].ip-version' value='6' />
                                        </set>
                                        <set>
                                            <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-network-collections.vnf-network-collection[$vnc-index].vnf-floating-ip.ip-addresses.vipv6-address'
  value='`$eipam-ip-block.plans[0].requests[0].ip-prefix`' />
                                        </set>
                                    </block>
                                </outcome>
                            </switch>
                            <for index='vlan-vnic-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic_length`' >
                                <for index='sub-index' start='0' end='`$tmp.vlan-vnics.vlan-vnic[$vlan-vnic-index].vnic-sub-interfaces.sub-interface-network-data_length`' >
                                    <set>
                                        <parameter name='tmp.vlan-vnics.vlan-vnic[$vlan-vnic-index].vnic-sub-interfaces.sub-interface-network-data[$sub-index].floating-ips.floating-ip-v6'
  value='`$eipam-ip-block.plans[0].requests[0].ip-prefix`' />
                                    </set>
                                </for>
                            </for>
                        </block>
                    </outcome>
                </switch>
            </for>
            <set>
                <parameter name='tmp.vf-module-topology.vf-module-assignments.vlan-vnfc-instance-groups.vlan-vnfc-instance-group[$vvig-index].vnfcs.vnfc[0].vnic-groups.vnic-group[0].vlan-vnics.'
  value='`$tmp.vlan-vnics.`' />
            </set>
            <return status='success'></return>
        </block>
    </method>
</service-logic>