summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-assign-from-preload.xml
blob: b0eb3f63a5df5fa195d34f8c048c04429249e518 (plain)
1
2
3
4

@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) 2019 Ericsson, Tieto. All rights reserved.
   Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  ================================================================================
  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.

  SPDX-License-Identifier: Apache-2.0
  ============LICENSE_END=========================================================
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.onap.policy.docker</groupId>
        <artifactId>docker</artifactId>
        <version>2.5.0-SNAPSHOT</version>
    </parent>

    <artifactId>policy-jdk</artifactId>
    <packaging>pom</packaging>
    <name>Policy JDK Docker images</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <dist.project.version>${project.version}</dist.project.version>
        <docker.skip>false</docker.skip>
        <docker.skip.build>false</docker.skip.build>
        <docker.skip.push>false</docker.skip.push>
        <docker.build.version>${project.version}</docker.build.version>
        <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
    </properties>

    <profiles>
        <profile>
            <id>docker</id>
            <modules>
                <module>alpine</module>
            </modules>
        </profile>
    </profiles>
</project>
='#n433'>433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875
<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='network-topology-operation-assign-from-preload' mode='sync'>
        <block atomic="true">
            <switch test="`$tmp.nidx`">
                <outcome value=''>
                    <switch test='`$service-data.networks.network_length`'>
                        <outcome value=''>
                            <set>
                                <parameter name='nidx' value='0' />
                                <parameter name='nidx_len' value='1'/>
                            </set>
                        </outcome>
                        <outcome value='Other'>
                            <set>
                                <parameter name='nidx' value='`$service-data.networks.network_length`' />
                                <parameter name='nidx_len' value='`$service-data.networks.network_length + 1`' />
                            </set>
                        </outcome>
                    </switch>
                </outcome>
                <outcome value='Other'>
                    <set>
                        <parameter name='nidx' value='`$tmp.nidx`' />
                        <parameter name='nidx_len' value='`$service-data.networks.network_length`' />
                    </set>
                </outcome>
            </switch>
            <set>
                <parameter name='service-data.networks.network[$nidx].network-data.sdnc-request-header.' value='`$network-topology-operation-input.sdnc-request-header.`' />
                <parameter name='service-data.networks.network[$nidx].network-data.request-information.' value='`$network-topology-operation-input.request-information.`' />
                <parameter name='service-data.networks.network[$nidx].network-data.service-information.' value='`$network-topology-operation-input.service-information.`' />
                <parameter name='service-data.networks.network[$nidx].network-data.network-information.' value='`$network-topology-operation-input.network-information.`' />
                <parameter name='service-data.networks.network[$nidx].network-data.network-request-input.' value='`$network-topology-operation-input.network-request-input.`' />
            </set>
            <set>
                <parameter name='tmp.l3-network.model-invariant-id' value="`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`" />
                <parameter name='tmp.l3-network.model-version-id' value="`$network-topology-operation-input.network-information.onap-model-information.model-version`" />
                <parameter name='tmp.l3-network.model-customization-id' value="`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`" />
                <parameter name='s-onap-model-information.model-invariant-uuid' value='`$service-model.invariant-uuid`' />
                <parameter name='s-onap-model-information.model-version' value='`$service-model.version`' />
                <parameter name='s-onap-model-information.model-uuid' value='`$service-model.service-uuid`' />
                <parameter name='s-onap-model-information.model-name' value='`$service-model.name`' />
                <parameter name='n-onap-model-information.model-invariant-uuid' value='`$network-model.invariant-uuid`' />
                <parameter name='n-onap-model-information.model-version' value='`$network-model.version`' />
                <parameter name='n-onap-model-information.model-uuid' value='`$network-model.uuid`' />
                <parameter name='n-onap-model-information.model-name' value='`$network-model.name`' />
            </set>
            <set>
                <parameter name='service-data.networks.network[$nidx].network-data.service-information.ecomp-model-information.' value="`$s-onap-model-information.`" />
                <parameter name='service-data.networks.network[$nidx].network-data.network-information.ecomp-model-information.' value="`$n-onap-model-information.`" />
            </set>
            <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
                <parameter name="source" value="`$prop.restapi.preload-network`"/>
                <parameter name="outputPath" value="tmp.pn-url"/>
                <parameter name="target" value="{network-name}"/>
                <parameter name="replacement" value="`$tmp.network-instance-name`"/>
            </execute>
            <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
                <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.pn-url`' />
                <parameter name='restapiUser' value='`$prop.controller.user`' />
                <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
                <parameter name='format' value='json' />
                <parameter name='httpMethod' value='GET' />
                <parameter name="responsePrefix" value="preload-data" />
                <outcome value='success'>
                    <block atomic="true"></block>
                </outcome>
                <outcome value='Other'>
                    <return status='failure'>
                        <parameter name="error-code" value="500" />
                        <parameter name="error-message" value="'Error: No preload-network found with network-name =' + $tmp.network-instance-name + ' in md-sal'" />
                    </return>
                </outcome>
            </execute>
            <set>
                <parameter name="tmp.error-message" value=""/>
            </set>
            <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
		key="l3-network.network-name = $tmp.network-instance-name" 
		local-only="false" 
		pfx="aai.l3-network">
                <outcome value='failure'>
                    <return status='failure'>
                        <parameter name="error-code" value="500" />
                        <parameter name="error-message" value="'Error searching for l3-network with network-name =' + $tmp.network-instance-name + 'from AnAI'" />
                    </return>
                </outcome>
            </get-resource>
            <set>
                <parameter name='tmp.l3-network.network-name' value="`$tmp.network-instance-name`" />
                <parameter name='tmp.l3-network.network-type' value="`$preload-data.preload-network-topology-information.network-topology-identifier-structure.network-type`" />
                <parameter name="tmp.l3-network.physical-network-name" value="`$preload-data.preload-network-topology-information.physical-network-name`" />
                <parameter name="tmp.l3-network.is-provider-network" value="`$preload-data.preload-network-topology-information.is-provider-network`" />
                <parameter name="tmp.l3-network.is-shared-network" value="`$preload-data.preload-network-topology-information.is-shared-network`" />
                <parameter name="tmp.l3-network.is-external-network" value="`$preload-data.preload-network-topology-information.network-topology-identifier-structure.network-type`" />
                <parameter name='tmp.l3-network.network-role' value="`$preload-data.preload-network-topology-information.network-topology-identifier-structure.network-role`" />
                <parameter name='tmp.l3-network.network-technology' value="`$preload-data.preload-network-topology-information.network-topology-identifier-structure.network-technology`" />
                <parameter name='tmp.l3-network.is-bound-to-vpn' value="`$network-model.is-bound-to-vpn`" />
                <parameter name="tmp.l3-network.tenant-id" value="`$network-topology-operation-input.network-request-input.tenant`" />
                <parameter name="tmp.l3-network.network-role-instance" value="0" />
                <parameter name='tmp.l3-network.orchestration-status' value="PendingCreate" />
                <parameter name='tmp.l3-network.model-invariant-id' value="`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`" />
                <parameter name='tmp.l3-network.model-version-id' value="`$network-topology-operation-input.network-information.onap-model-information.model-version`" />
                <parameter name='tmp.l3-network.model-customization-id' value="`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`" />
                <parameter name='tmp.l3-network.eipam-v6-address-plan' value="`$network-model.eipam-v6-address-plan`" />
                <parameter name='tmp.l3-network.eipam-v4-address-plan' value="`$network-model.eipam-v4-address-plan`" />
                <parameter name='tmp.l3-network.service-id' value="`$service-data.service-information.service-id`" />
                <parameter name='tmp.l3-network.self-link' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
 + $service-data.service-information.service-instance-id
 + '/service-data/networks/network/'
 + $tmp.l3-network.network-id
 + '/network-data/network-topology/'` " />
            </set>
            <set>
                <parameter name="service-data.networks.network[$nidx].network-data.network-information.network-id" value='`$tmp.l3-network.network-id`' />
                <parameter name="service-data.networks.network[$nidx].network-data.network-information.from-preload" value='true' />
                <parameter name="service-data.networks.network[$nidx].network-data.network-information.network-type" value='`$tmp.l3-network.network-type`' />
            </set>
            <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
                <parameter name='filename' value='/var/tmp/lmr-nto.log' />
            </execute>
            <switch test="`$preload-data.preload-network-topology-information.subnets_length`">
                <outcome value=''>
                    <set>
                        <parameter name="preload-data.preload-network-topology-information.subnets_length" value="0" />
                    </set>
                </outcome>
            </switch>
            <for index="i" start="0" end="`$preload-data.preload-network-topology-information.subnets_length`">
                <block atomic='true'>
                    <switch test="`$preload-data.preload-network-topology-information.subnets[$i].dhcp-enabled`">
                        <outcome value='Y'>
                            <set>
                                <parameter name="tmp.dhcpEnabled.boolean" value="true" />
                            </set>
                        </outcome>
                        <outcome value='N'>
                            <set>
                                <parameter name="tmp.dhcpEnabled.boolean" value="false" />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$preload-data.preload-network-topology-information.subnets[$i].addr-from-start`">
                        <outcome value='Y'>
                            <set>
                                <parameter name="tmp.addrFromStart.boolean" value="true" />
                            </set>
                        </outcome>
                        <outcome value=''>
                            <set>
                                <parameter name="tmp.addrFromStart.boolean" value="true" />
                            </set>
                        </outcome>
                        <outcome value='N'>
                            <set>
                                <parameter name="tmp.addrFromStart.boolean" value="false" />
                            </set>
                        </outcome>
                    </switch>
                    <set>
                        <parameter name="tmp.gateway-address" value="`$preload-data.preload-network-topology-information.subnets[$i].gateway-address`" />
                    </set>
                    <switch test="`$preload-data.preload-network-topology-information.subnets[$i].gateway-address`">
                        <outcome value=''>
                            <block atomic='true'>
                                <execute plugin="com.att.sdnctl.sli.plugin.ipAddressTools.IpAddressTool" method="getGatewayAddress">
                                    <parameter name="ipAddress" value="`$preload-data.preload-network-topology-information.subnets[$i].start-address`" />
                                    <parameter name="ipVersion" value="`$preload-data.preload-network-topology-information.subnets[$i].ip-version`" />
                                    <parameter name="subnet" value="`$preload-data.preload-network-topology-information.subnets[$i].cidr-mask`" />
                                    <parameter name="ctxVariable" value="tmp.return.generate.gateway-address" />
                                    <outcome value='failure'>
                                        <block atomic='true'>
                                            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                            <return status='failure'>
                                                <parameter name='error-code' value='500'/>
                                                <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                            </return>
                                        </block>
                                    </outcome>
                                </execute>
                                <set>
                                    <parameter name="tmp.gateway-address" value="`$tmp.return.generate.gateway-address`" />
                                </set>
                            </block>
                        </outcome>
                    </switch>
                    <set>
                        <parameter name="tmp.local.network-id" value="`$tmp.l3-network.network-id`" />
                    </set>
                    <call module="VNF-API" rpc="generate-subnets-subnet-id" mode="sync" >
                        <outcome value='failure'>
                            <block atomic='true'>
                                <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                <return status='failure'>
                                    <parameter name='error-code' value='500'/>
                                    <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                </return>
                            </block>
                        </outcome>
                    </call>
                    <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="subnet" 
		key="l3-network.network-id = $tmp.l3-network.network-id 
			AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid" >
                        <!-- Create subnet object -->
                        <parameter name="network-id" value="`$tmp.l3-network.network-id`" />
                        <parameter name="subnet-id" value="`$tmp.return.generate-subnets-subnet-id.uuid`" />
                        <parameter name="subnet-name" value="`$preload-data.preload-network-topology-information.subnets[$i].subnet-name`" />
                        <parameter name="subnet-role" value="`$preload-data.preload-network-topology-information.subnets[$i].subnet-role`" />
                        <parameter name="gateway-address" value="`$tmp.gateway-address`" />
                        <parameter name="network-start-address" value="`$preload-data.preload-network-topology-information.subnets[$i].start-address`" />
                        <parameter name="cidr-mask" value="`$preload-data.preload-network-topology-information.subnets[$i].cidr-mask`" />
                        <parameter name="ip-version" value="`$preload-data.preload-network-topology-information.subnets[$i].ip-version`" />
                        <parameter name="dhcp-start" value="`$preload-data.preload-network-topology-information.subnets[$i].dhcp-start-address`" />
                        <parameter name="dhcp-end" value="`$preload-data.preload-network-topology-information.subnets[$i].dhcp-end-address`" />
                        <parameter name="dhcp-enabled" value="`$tmp.dhcpEnabled.boolean`" />
                        <parameter name="ip-assignment-direction" value="`$tmp.addrFromStart.boolean`" />
                        <parameter name="orchestration-status" value="PendingCreate" />
                        <outcome value='failure'>
                            <block>
                                <set>
                                    <parameter name="error-code" value="500"/>
                                    <parameter name="tmp.error-message" value="`'An error occurred while saving subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/>
                                </set>
                                <block atomic='true'>
                                    <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                    <return status='failure'>
                                        <parameter name='error-code' value='500'/>
                                        <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                    </return>
                                </block>
                            </block>
                        </outcome>
                        <outcome value='not-found'>
                            <block>
                                <set>
                                    <parameter name="error-code" value="500"/>
                                    <parameter name="tmp.error-message" value="`'An error occurred while saving subnet in AnAI where subnet-id = ' + $tmp.return.generate-subnets-subnet-id.uuid`"/>
                                </set>
                                <block atomic='true'>
                                    <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                    <return status='failure'>
                                        <parameter name='error-code' value='500'/>
                                        <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                    </return>
                                </block>
                            </block>
                        </outcome>
                    </save>
                    <switch test='`$preload-data.preload-network-topology-information.host-routes_length`'>
                        <outcome value=''>
                            <set>
                                <parameter name='preload-data.preload-network-topology-information.host-routes_length' value='0' />
                            </set>
                        </outcome>
                    </switch>
                    <for index="h" start="0" end="`$preload-data.preload-network-topology-information.host-routes_length`">
                        <block atomic='true'>
                            <set>
                                <parameter name="tmp.local.subnet-id" value="`$tmp.return.generate-subnets-subnet-id.uuid`" />
                            </set>
                            <call module="GENERIC-RESOURCE-API" rpc="generate-host-routes-host-route-id" mode="sync" >
                                <outcome value='failure'>
                                    <block atomic='true'>
                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                        <return status='failure'>
                                            <parameter name='error-code' value='500'/>
                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                        </return>
                                    </block>
                                </outcome>
                            </call>
                            <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="host-route" 
		key="l3-network.network-id = $tmp.l3-network.network-id 
			AND subnet.subnet-id = $tmp.return.generate-subnets-subnet-id.uuid  
			AND host-route.host-route-id = $tmp.return.generate-host-routes-host-route-id.uuid" >
                                <!-- Create host-route object -->
                                <parameter name="host-route-id" value="`$tmp.return.generate-host-routes-host-route-id.uuid`" />
                                <parameter name="route-prefix" value="`$preload-data.preload-network-topology-information.subnets[$i].host-routes[$h].route-prefix`" />
                                <parameter name="next-hop" value="`$preload-data.preload-network-topology-information.subnets[$i].host-routes[$h].next-hop`" />
                                <outcome value='failure'>
                                    <block>
                                        <set>
                                            <parameter name="error-code" value="500"/>
                                            <parameter name="tmp.error-message" value="`'An error occurred while saving host-route in AnAI where host-route-id = ' + $tmp.return.generate-host-routes-host-route-id.uuid`"/>
                                        </set>
                                        <block atomic='true'>
                                            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                            <return status='failure'>
                                                <parameter name='error-code' value='500'/>
                                                <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                            </return>
                                        </block>
                                    </block>
                                </outcome>
                                <outcome value='not-found'>
                                    <block>
                                        <set>
                                            <parameter name="error-code" value="500"/>
                                            <parameter name="tmp.error-message" value="`'An error occurred while saving host-route in AnAI where host-route-id = ' + $tmp.return.generate-host-routes-host-route-id.uuid`"/>
                                        </set>
                                        <block atomic='true'>
                                            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                            <return status='failure'>
                                                <parameter name='error-code' value='500'/>
                                                <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                            </return>
                                        </block>
                                    </block>
                                </outcome>
                            </save>
                        </block>
                    </for>
                </block>
            </for>
            <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network:relationship-list" 
	key="l3-network.network-id = $tmp.l3-network.network-id" 
	force="true" 
	local-only="false">
                <!-- create relationship-list -->
                <parameter name="relationship-list.relationship[0].related-to" value="tenant" />
                <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
                <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.cloud-region.cloud-owner`" />
                <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
                <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-input.aic-cloud-region`" />
                <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="tenant.tenant-id" />
                <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$network-topology-operation-input.network-request-input.tenant`" />
                <parameter name="relationship-list.relationship[1].related-to" value="cloud-region" />
                <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-key" value="cloud-region.cloud-owner" />
                <parameter name="relationship-list.relationship[1].relationship-data[0].relationship-value" value="`$prop.cloud-region.cloud-owner`" />
                <parameter name="relationship-list.relationship[1].relationship-data[1].relationship-key" value="cloud-region.cloud-region-id" />
                <parameter name="relationship-list.relationship[1].relationship-data[1].relationship-value" value="`$network-topology-operation-input.network-request-input.aic-cloud-region`" />
                <outcome value='failure'>
                    <block atomic='true'>
                        <set>
                            <parameter name="error-code" value="500"/>
                            <parameter name="tmp.error-message" value="`'An error occurred while saving tenant and cloud-region relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/>
                        </set>
                        <block atomic='true'>
                            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                            <return status='failure'>
                                <parameter name='error-code' value='500'/>
                                <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                            </return>
                        </block>
                    </block>
                </outcome>
                <outcome value='not-found'>
                    <block atomic='true'>
                        <set>
                            <parameter name="error-code" value="500"/>
                            <parameter name="tmp.error-message" value="`'An error occurred while saving tenant and cloud-region relationship for l3-network in AnAI where network-id = ' + $tmp.l3-network.network-id`"/>
                        </set>
                        <block atomic='true'>
                            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                            <return status='failure'>
                                <parameter name='error-code' value='500'/>
                                <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                            </return>
                        </block>
                    </block>
                </outcome>
            </save>
            <switch test="`$preload-data.preload-network-topology-information.vpn-bindings_length`">
                <outcome value=''>
                    <set>
                        <parameter name="preload-data.preload-network-topology-information.vpn-bindings_length" value="0" />
                    </set>
                </outcome>
            </switch>
            <for index="i" start="0" end="`$preload-data.preload-network-topology-information.vpn-bindings_length`">
                <block atomic='true'>
                    <set>
                        <parameter name="tmp.vpn-binding-id" value="" />
                    </set>
                    <switch test="`$preload-data.preload-network-topology-information.vpn-bindings[$i].vpn-binding-id`">
                        <outcome value='Other'>
                            <set>
                                <parameter name="tmp.vpn-binding-id" value="`$preload-data.preload-network-topology-information.vpn-bindings[$i].vpn-binding-id`" />
                            </set>
                        </outcome>
                    </switch>
                    <switch test="`$tmp.vpn-binding-id != ''`">
                        <outcome value='true'>
                            <block atomic='true'>
                                <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="vpn-binding" 
		key="vpn-binding.vpn-id = $tmp.vpn-binding-id" 
		local-only="false" 
		pfx="tmp.AnAI.vpn-binding">
                                    <outcome value='success'>
                                        <switch test="`$tmp.AnAI.vpn-binding.vpn-id`" >
                                            <outcome value=''>
                                                <block atomic='true'>
                                                    <set>
                                                        <parameter name="error-code" value="500"/>
                                                        <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where vpn-binding-id  = ' + $tmp.vpn-binding-id + '.'`"/>
                                                    </set>
                                                    <block atomic='true'>
                                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                        <return status='failure'>
                                                            <parameter name='error-code' value='500'/>
                                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                        </return>
                                                    </block>
                                                </block>
                                            </outcome>
                                        </switch>
                                    </outcome>
                                    <outcome value='not-found'>
                                        <block atomic='true'>
                                            <set>
                                                <parameter name="error-code" value="500"/>
                                                <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where vpn-binding-id = ' + $preload-data.preload-network-topology-information.vpn-bindings[$i].vpn-binding-id`"/>
                                            </set>
                                            <block atomic='true'>
                                                <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                <return status='failure'>
                                                    <parameter name='error-code' value='500'/>
                                                    <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                </return>
                                            </block>
                                        </block>
                                    </outcome>
                                    <outcome value='failure'>
                                        <block atomic='true'>
                                            <set>
                                                <parameter name="error-code" value="500"/>
                                                <parameter name="tmp.error-message" value="`'Failed to query vpn-bindings from AnAI where vpn-binding-id = ' + $preload-data.preload-network-topology-information.vpn-bindings[$i].vpn-binding-id`"/>
                                            </set>
                                            <block atomic='true'>
                                                <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                <return status='failure'>
                                                    <parameter name='error-code' value='500'/>
                                                    <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                </return>
                                            </block>
                                        </block>
                                    </outcome>
                                </get-resource>
                                <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network:relationship-list" 
	key="l3-network.network-id = $tmp.l3-network.network-id" 
	force="true" 
	local-only="false">
                                    <parameter name="relationship-list.relationship[0].related-to" value="vpn-binding" />
                                    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="vpn-binding.vpn-id" />
                                    <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.vpn-binding-id`" />
                                    <outcome value='failure'>
                                        <block atomic='true'>
                                            <set>
                                                <parameter name="error-code" value="500"/>
                                                <parameter name="tmp.error-message" value="`'An error occurred while saving vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/>
                                            </set>
                                            <block atomic='true'>
                                                <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                <return status='failure'>
                                                    <parameter name='error-code' value='500'/>
                                                    <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                </return>
                                            </block>
                                        </block>
                                    </outcome>
                                    <outcome value='not-found'>
                                        <block atomic='true'>
                                            <set>
                                                <parameter name="error-code" value="500"/>
                                                <parameter name="tmp.error-message" value="`'An error occurred while saving vpn-binding relationship for l3-network in AnAI where vpn-id = ' + $tmp.vpn-binding-id`"/>
                                            </set>
                                            <block atomic='true'>
                                                <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                <return status='failure'>
                                                    <parameter name='error-code' value='500'/>
                                                    <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                </return>
                                            </block>
                                        </block>
                                    </outcome>
                                    <outcome value='success'>
                                        <set>
                                            <parameter name="tmp.is-bound-to-vpn" value="true" />
                                        </set>
                                    </outcome>
                                </save>
                            </block>
                        </outcome>
                    </switch>
                </block>
            </for>
            <switch test="`$preload-data.preload-network-topology-information.network-policy_length`">
                <outcome value=''>
                    <set>
                        <parameter name='preload-data.preload-network-topology-information.network-policy_length' value='0' />
                    </set>
                </outcome>
            </switch>
            <for index="i" start="0" end="`$preload-data.preload-network-topology-information.network-policy_length`">
                <switch test="`$preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn != ''`">
                    <outcome value='true'>
                        <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="network-policy" 
		key="network-policy.network-policy-fqdn = $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn" 
		local-only="false" 
		pfx="tmp.AnAI.network-policy">
                            <outcome value='not-found'>
                                <block atomic='true'>
                                    <set>
                                        <parameter name="error-code" value="500"/>
                                        <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn`"/>
                                    </set>
                                    <block atomic='true'>
                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                        <return status='failure'>
                                            <parameter name='error-code' value='500'/>
                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                        </return>
                                    </block>
                                </block>
                            </outcome>
                            <outcome value='failure'>
                                <block atomic='true'>
                                    <set>
                                        <parameter name="error-code" value="500"/>
                                        <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn`"/>
                                    </set>
                                    <block atomic='true'>
                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                        <return status='failure'>
                                            <parameter name='error-code' value='500'/>
                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                        </return>
                                    </block>
                                </block>
                            </outcome>
                            <outcome value='success'>
                                <switch test="`$tmp.AnAI.network-policy.network-policy-id`" >
                                    <outcome value=''>
                                        <block atomic='true'>
                                            <set>
                                                <parameter name="error-code" value="500"/>
                                                <parameter name="tmp.error-message" value="`'Failed to query newtork-policy from AnAI where network-policy-fqdn = ' + $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn + '. It is likely that the same network-policy-fqdn points to more than one network-policy objects in AnAI.'`"/>
                                            </set>
                                            <block atomic='true'>
                                                <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                <return status='failure'>
                                                    <parameter name='error-code' value='500'/>
                                                    <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                </return>
                                            </block>
                                        </block>
                                    </outcome>
                                    <outcome value='Other'>
                                        <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network:relationship-list" 
	key="l3-network.network-id = $tmp.l3-network.network-id" >
                                            <parameter name="relationship-list.relationship[0].related-to" value="network-policy" />
                                            <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="network-policy.network-policy-id" />
                                            <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.network-policy.network-policy-id`" />
                                            <outcome value='failure'>
                                                <block atomic='true'>
                                                    <set>
                                                        <parameter name="error-code" value="500"/>
                                                        <parameter name="tmp.error-message" value="`'An error occurred while saving network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/>
                                                    </set>
                                                    <block atomic='true'>
                                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                        <return status='failure'>
                                                            <parameter name='error-code' value='500'/>
                                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                        </return>
                                                    </block>
                                                </block>
                                            </outcome>
                                            <outcome value='not-found'>
                                                <block atomic='true'>
                                                    <set>
                                                        <parameter name="error-code" value="500"/>
                                                        <parameter name="tmp.error-message" value="`'An error occurred while saving network-policy relationship for l3-network in AnAI where network-policy-id = ' + $tmp.AnAI.network-policy.network-policy-id`"/>
                                                    </set>
                                                    <block atomic='true'>
                                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                        <return status='failure'>
                                                            <parameter name='error-code' value='500'/>
                                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                        </return>
                                                    </block>
                                                </block>
                                            </outcome>
                                        </save>
                                    </outcome>
                                </switch>
                            </outcome>
                        </get-resource>
                    </outcome>
                </switch>
            </for>
            <switch test="`$preload-data.preload-network-topology-information.route-table-reference_length`">
                <outcome value=''>
                    <set>
                        <parameter name='preload-data.preload-network-topology-information.route-table-reference_length' value='0' />
                    </set>
                </outcome>
            </switch>
            <for index="i" start="0" end="`$preload-data.preload-network-topology-information.route-table-reference_length`">
                <switch test="`$preload-data.preload-network-topology-information.route-table-reference[$i].route-table-reference-fqdn != ''`">
                    <outcome value='true'>
                        <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="route-table-reference" 
		key="route-table-reference.route-table-reference-fqdn = $preload-data.preload-network-topology-information.route-table-reference[$i].route-table-reference-fqdn" 
		pfx="tmp.AnAI.route-table-reference">
                            <outcome value='not-found'>
                                <block atomic='true'>
                                    <set>
                                        <parameter name="error-code" value="500"/>
                                        <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn`"/>
                                    </set>
                                    <block atomic='true'>
                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                        <return status='failure'>
                                            <parameter name='error-code' value='500'/>
                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                        </return>
                                    </block>
                                </block>
                            </outcome>
                            <outcome value='failure'>
                                <block atomic='true'>
                                    <set>
                                        <parameter name="error-code" value="500"/>
                                        <parameter name="tmp.error-message" value="`'Failed to query network-policy n AnAI where network-policy-fqdn = ' + $preload-data.preload-network-topology-information.network-policy[$i].network-policy-fqdn`"/>
                                    </set>
                                    <block atomic='true'>
                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                        <return status='failure'>
                                            <parameter name='error-code' value='500'/>
                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                        </return>
                                    </block>
                                </block>
                            </outcome>
                            <outcome value='success'>
                                <switch test="`$tmp.AnAI.route-table-reference.route-table-reference-id`" >
                                    <outcome value=''>
                                        <block atomic='true'>
                                            <set>
                                                <parameter name="error-code" value="500"/>
                                                <parameter name="tmp.error-message" value="`'Failed to query route-table-reference from AnAI where route-table-reference-fqdn = ' + $preload-data.preload-network-topology-information.route-table-reference[$i].route-table-reference-fqdn + '. It is likely that the same route-table-reference-fqdn points to more than one route-table-reference objects in AnAI.'`"/>
                                            </set>
                                            <block atomic='true'>
                                                <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                <return status='failure'>
                                                    <parameter name='error-code' value='500'/>
                                                    <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                </return>
                                            </block>
                                        </block>
                                    </outcome>
                                    <outcome value='Other'>
                                        <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network:relationship-list" 
	key="l3-network.network-id = $tmp.l3-network.network-id" >
                                            <parameter name="relationship-list.relationship[0].related-to" value="route-table-reference" />
                                            <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="route-table-reference.route-table-reference-id" />
                                            <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$tmp.AnAI.route-table-reference.route-table-reference-id`" />
                                            <outcome value='failure'>
                                                <block atomic='true'>
                                                    <set>
                                                        <parameter name="error-code" value="500"/>
                                                        <parameter name="tmp.error-message" value="`'An error occurred while saving route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/>
                                                    </set>
                                                    <block atomic='true'>
                                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                        <return status='failure'>
                                                            <parameter name='error-code' value='500'/>
                                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                        </return>
                                                    </block>
                                                </block>
                                            </outcome>
                                            <outcome value='not-found'>
                                                <block atomic='true'>
                                                    <set>
                                                        <parameter name="error-code" value="500"/>
                                                        <parameter name="tmp.error-message" value="`'An error occurred while saving route-table-reference relationship for l3-network in AnAI where route-table-reference-id = ' + $tmp.AnAI.route-table-reference.route-table-reference-id`"/>
                                                    </set>
                                                    <block atomic='true'>
                                                        <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                                        <return status='failure'>
                                                            <parameter name='error-code' value='500'/>
                                                            <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                                        </return>
                                                    </block>
                                                </block>
                                            </outcome>
                                        </save>
                                    </outcome>
                                </switch>
                            </outcome>
                        </get-resource>
                    </outcome>
                </switch>
            </for>
            <switch test="`$tmp.is-bound-to-vpn`">
                <outcome value="true">
                    <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
		key="l3-network.network-id = $tmp.l3-network.network-id" >
                        <parameter name="is-bound-to-vpn" value="true" />
                        <outcome value='failure'>
                            <block atomic='true'>
                                <set>
                                    <parameter name="error-code" value="500"/>
                                    <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/>
                                </set>
                                <block atomic='true'>
                                    <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                    <return status='failure'>
                                        <parameter name='error-code' value='500'/>
                                        <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                    </return>
                                </block>
                            </block>
                        </outcome>
                        <outcome value='not-found'>
                            <block atomic='true'>
                                <set>
                                    <parameter name="error-code" value="500"/>
                                    <parameter name="tmp.error-message" value="`'An error occurred while updating l3-network is-bound-to-vpn in AnAI where network-id = ' + $tmp.return.generate-l3network-network-id.uuid`"/>
                                </set>
                                <block atomic='true'>
                                    <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                                    <return status='failure'>
                                        <parameter name='error-code' value='500'/>
                                        <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                                    </return>
                                </block>
                            </block>
                        </outcome>
                    </update>
                </outcome>
            </switch>
            <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network:relationship-list" 
	key="l3-network.network-id = $tmp.l3-network.network-id" >
                <parameter name="relationship-list.relationship[0].related-to" value="service-instance" />
                <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="customer.global-customer-id" />
                <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$service-data.service-information.global-customer-id`" />
                <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="service-subscription.service-type" />
                <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="`$service-data.service-information.subscription-service-type`" />
                <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-key" value="service-instance.service-instance-id" />
                <parameter name="relationship-list.relationship[0].relationship-data[2].relationship-value" value="`$service-data.service-information.service-instance-id`" />
                <outcome value='failure'>
                    <block atomic='true'>
                        <set>
                            <parameter name="error-code" value="500"/>
                            <parameter name="tmp.error-message" value="`'An error occurred while saving service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/>
                        </set>
                        <block atomic='true'>
                            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                            <return status='failure'>
                                <parameter name='error-code' value='500'/>
                                <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                            </return>
                        </block>
                    </block>
                </outcome>
                <outcome value='not-found'>
                    <block atomic='true'>
                        <set>
                            <parameter name="error-code" value="500"/>
                            <parameter name="tmp.error-message" value="`'An error occurred while saving service-instance relationship for l3-network in AnAI where service-instance-id = ' + $network-topology-operation-input.service-information.service-instance-id`"/>
                        </set>
                        <block atomic='true'>
                            <delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" 
	resource="l3-network" 
	key="l3-network.network-id = $tmp.return.generate-l3network-network-id.uuid"></delete>
                            <return status='failure'>
                                <parameter name='error-code' value='500'/>
                                <parameter name='error-message' value="`'Error writing to l3-netework - ' + $tmp.error-message`"/>
                            </return>
                        </block>
                    </block>
                </outcome>
            </save>
            <set>
                <parameter name='network-topology.network-topology-identifier-structure.' value='`$tmp.l3-network.`' />
                <parameter name='network-topology.tenant' value='`$network-topology-operation-input.network-request-input.tenant`' />
                <parameter name='network-topology.onap-model-information.' value='`$network-topology-operation-input.network-information.onap-model-information.`' />
                <parameter name='network-topology.network-parameters.' value='`$network-topology-operation-input.network-request-input.network-parameters.`' />
                <parameter name='network-topology.aic-cloud-region' value='`$network-topology-operation-input.network-request-input.aic-cloud-region`' />
            </set>
            <set>
                <parameter name="service-data.networks.network[$nidx].network-id" value='`$tmp.l3-network.network-id`' />
                <parameter name="service-data.networks.network[$nidx].network-data.network-information.from-preload" value='true' />
                <parameter name="service-data.networks.network[$nidx].network-data.network-topology." value='$network-topology.' />
                <parameter name="service-data.networks.network_length" value='`$nidx_len`' />
            </set>
            <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
                <parameter name='filename' value='/var/tmp/lmr-nto2.log' />
            </execute>
            <set>
                <parameter name='networkId' value='`$tmp.l3-network.network-id`' />
            </set>
            <set>
                <parameter name='network-object-path'
 value="`$tmp.l3-network.self-link`"/>
            </set>
            <set>
                <parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.order-status' value='PendingCreate' />
                <parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-rpc-action' value='`$network-topology-operation-input.sdnc-request-header.svc-action`' />
                <parameter name='service-data.networks.network[$nidx].network-data.network-level-oper-status.last-action' value='`$network-topology-operation-input.request-information.request-action`' />
            </set>
            <return status='success' ></return>
        </block>
    </method>
</service-logic>