vnfapi yang model change 93/34593/1
authorCheung, Pat (kc1472) <kc1472@att.com>
Wed, 7 Mar 2018 23:29:21 +0000 (23:29 +0000)
committerCheung, Pat (kc1472) <kc1472@att.com>
Wed, 7 Mar 2018 23:29:21 +0000 (23:29 +0000)
Enhance vnfapi yang model to support network-role-tag, and subnet-role

Change-Id: I8f0c7cb492df905881a9cb6747e8f7da6d07c82e
Issue-ID: CCSDK-200
Signed-off-by: Cheung, Pat (kc1472) <kc1472@att.com>
vnfapi/model/src/main/yang/VNF-API.yang

index 9b621aa..2648a38 100755 (executable)
-module VNF-API {\r
-\r
-    yang-version 1;\r
-\r
-    namespace "org:onap:sdnctl:vnf";\r
-\r
-    prefix vnfapi;\r
-\r
-    import ietf-inet-types { prefix "ietf"; revision-date "2010-09-24"; }\r
-\r
-    include "vnfsubmodule";\r
-\r
-    organization "ONAP";\r
-\r
-    contact\r
-       "Network Controller <onap-sdnc@lists.onap.org>";\r
-\r
-    description\r
-        "Defines API interface for VNF Orchestration";\r
-\r
-    revision "2015-07-20" {\r
-        description\r
-            "Initial draft";\r
-    }\r
-\r
-    // Last updated on 8-17-2016\r
-    grouping sdnc-request-header {\r
-        container sdnc-request-header {\r
-            leaf svc-request-id {\r
-                type string;\r
-            }\r
-            leaf svc-action {\r
-                type enumeration {\r
-                    enum "reserve";\r
-                    enum "assign";\r
-                    enum "activate";  // equal to commit\r
-                    enum "delete";    // equal to commit\r
-                    enum "changeassign";\r
-                    enum "changedelete";\r
-                    enum "rollback";\r
-                }\r
-            }\r
-            leaf svc-notification-url {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping request-information {\r
-        container request-information {\r
-            leaf request-id {\r
-                type string;\r
-            }\r
-            leaf request-action {\r
-                type enumeration {\r
-                    enum "PreloadNetworkRequest";\r
-                    enum "DeletePreloadNetworkRequest";\r
-                    enum "NetworkActivateRequest";\r
-                    enum "DisconnectNetworkRequest";\r
-                    enum "PreloadVNFRequest";\r
-                    enum "DeletePreloadVNFRequest";\r
-                    enum "VNFActivateRequest";\r
-                    enum "ChangeVNFActivateRequest";\r
-                    enum "DisconnectVNFRequest";\r
-                    enum "PreloadVnfInstanceRequest";\r
-                    enum "DeletePreloadVnfInstanceRequest";\r
-                    enum "VnfInstanceActivateRequest";\r
-                    enum "ChangeVnfInstanceActivateRequest";\r
-                    enum "DisconnectVnfInstanceRequest";\r
-                    enum "PreloadVfModuleRequest";\r
-                    enum "DeletePreloadVfModuleRequest";\r
-                    enum "VfModuleActivateRequest";\r
-                    enum "ChangeVfModuleActivateRequest";\r
-                    enum "DisconnectVfModuleRequest";\r
-                }\r
-            }\r
-            leaf request-sub-action {\r
-                type enumeration {\r
-                    enum "SUPP";\r
-                    enum "CANCEL";\r
-                }\r
-            }\r
-            leaf source {\r
-                type string;\r
-            }\r
-            leaf notification-url {\r
-                type string;\r
-            }\r
-            leaf order-number {\r
-                type string;\r
-            }\r
-            leaf order-version {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping service-information {\r
-        container service-information {\r
-            // 1610 use for AnAI subscription-service-type\r
-            leaf service-type {\r
-                type string;\r
-                description "AnAI subscription-service-type";\r
-            }\r
-            leaf service-id {\r
-                type string;\r
-            }\r
-            leaf service-instance-id {\r
-                type string;\r
-                description "A service instance that a VNF or a l3-network is associated with";\r
-            }\r
-            // 1610 use for global-customer-id\r
-            leaf subscriber-name {\r
-                type string;\r
-                description "AnAI global-customer-id";\r
-            }\r
-        }\r
-    }\r
-\r
-\r
-    grouping vnf-request-information {\r
-        container vnf-request-information {\r
-            leaf vnf-request-version {\r
-                type string;\r
-            }\r
-            leaf model-customization-uuid {\r
-                type string;\r
-                description "customized resource, i.e. vf-module, for use within a given service";\r
-            }\r
-            leaf use-preload {\r
-                type enumeration {\r
-                    enum "Y";\r
-                    enum "N";\r
-                }\r
-                description "orchestrate vf-module with full preload data or TOSCA lookup plus EIPAM automation";\r
-            }\r
-            leaf vnf-id {\r
-                type string;\r
-                description "vf-module-id";\r
-            }\r
-            leaf vnf-type {\r
-                type string;\r
-                description "vf-module-type";\r
-            }\r
-            leaf vnf-name {\r
-                type string;\r
-                description "vf-module-name";\r
-            }\r
-            leaf generic-vnf-id {\r
-                type string;\r
-                description "generic vnf-id";\r
-            }\r
-            leaf generic-vnf-type {\r
-                type string;\r
-                description "generic vnf type";\r
-            }\r
-            leaf generic-vnf-name {\r
-                type string;\r
-                description "generic vnf name";\r
-            }\r
-            leaf tenant {\r
-                type string;\r
-            }\r
-            leaf aic-clli {\r
-                type string;\r
-            }\r
-            leaf aic-cloud-region {\r
-                type string;\r
-                description "The AIC cloud region which maps to contrail versions";\r
-            }\r
-            list vnf-networks {\r
-                key network-role;\r
-                uses vnf-network;\r
-                description "Network List";\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping network-request-information {\r
-        container network-request-information {\r
-            leaf network-id {\r
-                type string;\r
-            }\r
-            leaf network-type {\r
-                type string;\r
-            }\r
-            leaf network-name {\r
-                type string;\r
-            }\r
-            leaf tenant {\r
-                type string;\r
-            }\r
-            leaf aic-clli {\r
-                type string;\r
-            }\r
-            leaf aic-cloud-region {\r
-                type string;\r
-                description "The AIC cloud region which maps to contrail versions";\r
-            }\r
-        }\r
-    }\r
-\r
-    /***********************************************************/\r
-    /*               PRELOAD DATA                                 */\r
-    /***********************************************************/\r
-\r
-    container preload-vnfs {\r
-        uses preload-model-information;\r
-    }\r
-    grouping preload-model-information {\r
-        list vnf-preload-list {\r
-            key "vnf-name vnf-type";\r
-            leaf vnf-name {\r
-                type string;\r
-                description "vf-module-name";\r
-            }\r
-            leaf vnf-type {\r
-                type string;\r
-                description "vf-module-type";\r
-            }\r
-            uses preload-data;\r
-        }\r
-    }\r
-\r
-    // For preload networks it will have network-topology-information\r
-    // For preload vnfs, it will have vnf-topology-information\r
-    grouping preload-data {\r
-        container preload-data {\r
-            uses vnf-topology-information;\r
-            uses network-topology-information;\r
-            uses oper-status;\r
-        }\r
-    }\r
-\r
-\r
-    grouping vnf-topology-information {\r
-        container vnf-topology-information {\r
-            uses vnf-topology-identifier;\r
-            uses vnf-assignments;\r
-            uses vnf-parameters;\r
-        }\r
-    }\r
-\r
-    grouping vnf-topology-identifier {\r
-        container vnf-topology-identifier {\r
-            leaf service-type {\r
-                type string;\r
-            }\r
-            leaf service-id {\r
-                type string;\r
-            }\r
-            leaf vnf-name {\r
-                type string;\r
-                description "vf-module-name";\r
-            }\r
-            leaf vnf-type {\r
-                type string;\r
-                description "vf-module-type";\r
-            }\r
-            leaf generic-vnf-name {\r
-                type string;\r
-            }\r
-            leaf generic-vnf-type {\r
-                type string;\r
-            }\r
-            leaf generic-vnf-id {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping vnf-assignments {\r
-        container vnf-assignments {\r
-            leaf vnf-status {\r
-                type string;\r
-                description "Orchestration Status from AAI - to be set by SDNC";\r
-            }\r
-            list availability-zones {\r
-                key "availability-zone";\r
-                ordered-by  user;\r
-                leaf availability-zone {\r
-                    type string;\r
-                    description "Openstack availability zone name or UUID";\r
-                }\r
-            }\r
-            list vnf-networks {\r
-                key network-role;\r
-                uses vnf-network;\r
-                // 1610\r
-                uses sriov-vlan-filter-list;\r
-                description "Network List";\r
-            }\r
-            uses vm-topology;\r
-        }\r
-    }\r
-\r
-    grouping vm-topology {\r
-        list vnf-vms {\r
-            key vm-type;\r
-            leaf vm-type {\r
-                type string;\r
-            }\r
-            leaf vm-count {\r
-                type uint8;\r
-            }\r
-            list vm-names {\r
-                key "vm-name";\r
-                ordered-by user;\r
-                leaf vm-name {\r
-                    type string;\r
-                }\r
-            }\r
-            //leaf-list vm-names {\r
-            //    type string;\r
-            //    ordered-by user;\r
-            //}\r
-            list vm-networks {\r
-                key network-role;\r
-                uses vm-network;\r
-                description "Network List";\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping vnf-network {\r
-        leaf network-role {\r
-            type string;\r
-            description "A Network Role to which a VNF must connect";\r
-        }\r
-        leaf network-name {\r
-            type string;\r
-            description "Unique Neutron UUID of an instance of the network role ";\r
-        }\r
-        leaf neutron-id {\r
-            type string;\r
-            description "Unique Neutron UUID of an instance of the network role ";\r
-        }\r
-        leaf network-id {\r
-            type string;\r
-            description "Unique Neutron UUID of an instance of the network role ";\r
-        }\r
-        leaf subnet-id {\r
-            type string;\r
-            description "ipv4 subnet UUID to be passed into the HEAT template for DHCP assignment";\r
-        }\r
-        leaf contrail-network-fqdn {\r
-            type string;\r
-            description "contrail network policy object";\r
-        }\r
-        // 1610\r
-        leaf ipv6-subnet-id {\r
-            type string;\r
-            description "ipv6 subnet UUID to be passed into the HEAT template for DHCP assignment";\r
-        }\r
-        leaf ipv6-subnet-name {\r
-            type string;\r
-            description "ipv6 subnet-name that corresponds to the ipv6 subnet-id";\r
-        }\r
-        leaf subnet-name {\r
-            type string;\r
-            description "ipv4 subnet-name that corresponds to the ipv4 subnet-id";\r
-        }\r
-    }\r
-\r
-    // 1610\r
-    grouping sriov-vlan-filter-list {\r
-        list sriov-vlan-filter-list {\r
-            key "sriov-vlan-filter";\r
-            leaf sriov-vlan-filter {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping vm-network {\r
-        leaf network-role {\r
-            type string;\r
-            description "network (identified by role) that this VM connects to.  Should also be included in the vnf-networks for the containing VNF";\r
-\r
-        }\r
-        leaf use-dhcp {\r
-            type enumeration {\r
-                  enum "Y";\r
-                  enum "N";\r
-            }\r
-            description "Indicator to use DHCP on this network for this VM";\r
-        }\r
-        leaf ip-count {\r
-            type uint8;\r
-            description "The number of ip addresses to be assigned per vm for this network role";\r
-        }\r
-        list network-ips {\r
-            key "ip-address";\r
-            ordered-by user;\r
-            leaf ip-address {\r
-                //type string;\r
-                type ietf:ip-address;\r
-                description "List of assigned ipv4 addresses on a network";\r
-            }\r
-        }\r
-        list network-ips-v6 {\r
-            key "ip-address-ipv6";\r
-            ordered-by user;\r
-            leaf ip-address-ipv6 {\r
-                //type string;\r
-                type ietf:ipv6-address;\r
-                description "List of assigned ipv6 addresses on a network";\r
-            }\r
-        }\r
-        list network-macs {\r
-            key "mac-address";\r
-            ordered-by user;\r
-            leaf mac-address {\r
-                type string;\r
-                description "List of network assignments for this VM (one per network)";\r
-            }\r
-        }\r
-        leaf floating-ip {\r
-            //type string;\r
-            type ietf:ip-address;\r
-            description "Floating ipv4 for VMs of a given type on this network";\r
-        }\r
-        leaf floating-ip-v6 {\r
-            //type string;\r
-            type ietf:ipv6-address;\r
-            description "Floating ipv6 for VMs of a given type on this network";\r
-        }\r
-        list interface-route-prefixes {\r
-            key "interface-route-prefix-cidr";\r
-            ordered-by user;\r
-            leaf interface-route-prefix {\r
-                type ietf:ip-address;\r
-                description "OBSOLETE, route prefixes (CIDRs) to be provided to MSO in vnf-topology as a list of static routes";\r
-            }\r
-            leaf interface-route-prefix-cidr {\r
-                type string;\r
-                description "route prefixes (CIDRs) in ip/cidr format to be provided to MSO in vnf-topology as a list of static routes";\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping vnf-parameters {\r
-        list vnf-parameters {\r
-            key vnf-parameter-name;\r
-            leaf vnf-parameter-name {\r
-                type string;\r
-                description "The name of an arbitrary instance-specific vnf-parameters";\r
-            }\r
-            leaf vnf-parameter-value {\r
-                type string;\r
-                description "The value of an arbitrary instance-specific vnf-parameters ";\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping network-topology-information {\r
-        container network-topology-information {\r
-            uses network-topology-identifier;\r
-            uses subnets;\r
-            uses vpn-bindings;\r
-            uses network-policy;\r
-            uses route-table-reference;\r
-            uses provider-network-information;\r
-        }\r
-    }\r
-\r
-    grouping network-topology-identifier {\r
-        container network-topology-identifier {\r
-            leaf service-type {\r
-                type string;\r
-            }\r
-            leaf network-name {\r
-                type string;\r
-            }\r
-            leaf network-role {\r
-                type string;\r
-            }\r
-            leaf network-type {\r
-                type string;\r
-            }\r
-            leaf network-technology{\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-    grouping subnets {\r
-        list subnets {\r
-            key start-address;\r
-            leaf start-address{\r
-                type ietf:ip-address;\r
-                //type string;\r
-            }\r
-            leaf gateway-address{\r
-                //type string;\r
-                type ietf:ip-address;\r
-            }\r
-            leaf cidr-mask{\r
-                type string;\r
-            }\r
-            leaf ip-version {\r
-                type string;\r
-            }\r
-            leaf dhcp-enabled {\r
-                type enumeration {\r
-                    enum "Y";\r
-                    enum "N";\r
-                }\r
-            }\r
-            leaf dhcp-start-address {\r
-                type string;\r
-            }\r
-            leaf dhcp-end-address {\r
-                type string;\r
-            }\r
-            // 1610\r
-            leaf subnet-name {\r
-                type string;\r
-            }\r
-\r
-        }\r
-    }\r
-\r
-    grouping vpn-bindings {\r
-        list vpn-bindings {\r
-            key vpn-binding-id;\r
-            leaf vpn-binding-id {\r
-                type string;\r
-            }\r
-            leaf global-route-target {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping network-policy {\r
-        list network-policy {\r
-            key network-policy-fqdn;\r
-            leaf network-policy-fqdn {\r
-                type string;\r
-            }\r
-            leaf network-policy-id {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-    //1610\r
-    grouping route-table-reference {\r
-        list route-table-reference {\r
-            key "route-table-reference-id";\r
-            leaf route-table-reference-id {\r
-                type string;\r
-            }\r
-            leaf route-table-reference-fqdn {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-    // 1610\r
-    grouping provider-network-information {\r
-        container provider-network-information {\r
-               leaf physical-network-name {\r
-                   type string;\r
-               }\r
-               leaf is-provider-network {\r
-                   type boolean;\r
-               }\r
-               leaf is-shared-network {\r
-                   type boolean;\r
-               }\r
-               leaf is-external-network {\r
-                type boolean;\r
-            }\r
-        }\r
-    }\r
-\r
-    /***********************************************************/\r
-    /*               SERVICE_DATA                                */\r
-    /***********************************************************/\r
-    container vnfs {\r
-        uses vnf-model-infrastructure;\r
-    }\r
-    grouping vnf-model-infrastructure {\r
-        list vnf-list {\r
-            key vnf-id;\r
-            leaf vnf-id {\r
-                type string;\r
-                mandatory true;\r
-                description "vf-module-id";\r
-            }\r
-            uses service-data;\r
-            uses service-status;\r
-        }\r
-    }\r
-    grouping service-data {\r
-        container service-data {\r
-            uses vnf-configuration-information;\r
-            uses oper-status;\r
-        }\r
-    }\r
-    grouping service-status {\r
-        container service-status {\r
-            leaf response-code {\r
-                type string;\r
-            }\r
-            leaf response-message {\r
-                type string;\r
-            }\r
-            leaf final-indicator {\r
-                type string;\r
-            }\r
-            leaf request-status {\r
-                type enumeration {\r
-                    enum "synccomplete";\r
-                    enum "asynccomplete";\r
-                    enum "notifycomplete";\r
-                }\r
-            }\r
-            leaf vnfsdn-action {\r
-                type enumeration {\r
-                    enum "PreloadNetworkRequest";\r
-                    enum "DeletePreloadNetworkRequest";\r
-                    enum "NetworkActivateRequest";\r
-                    enum "DisconnectNetworkRequest";\r
-                    enum "PreloadVNFRequest";\r
-                    enum "DeletePreloadVNFRequest";\r
-                    enum "VNFActivateRequest";\r
-                    enum "ChangeVNFActivateRequest";\r
-                    enum "DisconnectVNFRequest";\r
-                    enum "PreloadVnfInstanceRequest";\r
-                    enum "DeletePreloadVnfInstanceRequest";\r
-                    enum "VnfInstanceActivateRequest";\r
-                    enum "ChangeVnfInstanceActivateRequest";\r
-                    enum "DisconnectVnfInstanceRequest";\r
-                    enum "PreloadVfModuleRequest";\r
-                    enum "DeletePreloadVfModuleRequest";\r
-                    enum "VfModuleActivateRequest";\r
-                    enum "ChangeVfModuleActivateRequest";\r
-                    enum "DisconnectVfModuleRequest";\r
-                }\r
-            }\r
-            leaf vnfsdn-subaction {\r
-                type enumeration {\r
-                    enum "SUPP";\r
-                    enum "CANCEL";\r
-                }\r
-            }\r
-            leaf rpc-name {\r
-                type enumeration {\r
-                    enum "vnf-topology-operation";\r
-                    enum "preload-vnf-topology-operation";\r
-                    enum "vnf-instance-topology-operation";\r
-                    enum "preload-vnf-instance-topology-operation";\r
-                    enum "vf-module-topology-operation";\r
-                    enum "preload-vf-module-topology-operation";\r
-                }\r
-            }\r
-            leaf rpc-action {\r
-                type enumeration {\r
-                    enum "reserve";\r
-                    enum "assign";\r
-                    enum "activate";  // equal to commit\r
-                    enum "delete";      // equal to commit\r
-                    enum "changeassign";\r
-                    enum "changedelete";\r
-                    enum "rollback";\r
-                }\r
-            }\r
-            leaf response-timestamp {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-    grouping vnf-configuration-information {\r
-        uses sdnc-request-header;\r
-        uses request-information;\r
-        uses service-information;\r
-        uses vnf-request-information;\r
-        uses vnf-topology;\r
-    }\r
-    grouping vnf-topology-response-body {\r
-        leaf svc-request-id {\r
-            type string;\r
-        }\r
-        leaf response-code {\r
-            type string;\r
-        }\r
-        leaf response-message {\r
-            type string;\r
-        }\r
-        leaf ack-final-indicator {\r
-            type string;\r
-        }\r
-    }\r
-\r
-    grouping vnf-information {\r
-        container vnf-information {\r
-            leaf vnf-service-type {\r
-                type string;\r
-            }\r
-            leaf vnf-id {\r
-                type string;\r
-                description "vf-module-id";\r
-            }\r
-        }\r
-    }\r
-\r
-    grouping network-information {\r
-        container network-information {\r
-            leaf network-service-type {\r
-                type string;\r
-            }\r
-            leaf network-id {\r
-                type string;\r
-            }\r
-        }\r
-    }\r
-\r
-\r
-    // Carried over from l3sdn and potentially not needed\r
-    grouping oper-status {\r
-        container oper-status {\r
-            leaf order-status {\r
-                type enumeration {\r
-                    enum "Active";\r
-                    enum "PendingAssignment";\r
-                    enum "PendingCreate";\r
-                    enum "PendingUpdate";\r
-                    enum "PendingDelete";\r
-                    enum "Deleted";\r
-\r
-                }\r
-            }\r
-            leaf last-action {\r
-                type enumeration {\r
-                    enum "VNFActivateRequest";\r
-                    enum "ChangeVNFActivateRequest";\r
-                    enum "VnfInstanceActivateRequest";\r
-                    enum "ChangeVnfInstanceActivateRequest";\r
-                    enum "VfModuleActivateRequest";\r
-                    enum "ChangeVfModuleActivateRequest";\r
-                    enum "DisconnectVNFRequest";\r
-                    enum "DisconnectVnfInstanceRequest";\r
-                    enum "DisconnectVfModuleRequest";\r
-                    enum "PreloadVNFRequest";\r
-                    enum "DeletePreloadVNFRequest";\r
-                    enum "PreloadVnfInstanceRequest";\r
-                    enum "DeletePreloadVnfInstanceRequest";\r
-                    enum "PreloadVfModuleRequest";\r
-                    enum "DeletePreloadVfModuleRequest";\r
-                }\r
-            }\r
-            leaf last-svc-request-id {\r
-                type string;\r
-            }\r
-            leaf last-order-status {\r
-                type enumeration {\r
-                    enum "Active";\r
-                    enum "PendingAssignment";\r
-                    enum "PendingCreate";\r
-                    enum "PendingUpdate";\r
-                    enum "PendingDelete";\r
-                    enum "Deleted";\r
-                }\r
-            }\r
-            leaf create-timestamp {\r
-                type string;\r
-            }\r
-            leaf modify-timestamp {\r
-                type string;\r
-            }\r
-            leaf maintenance-indicator {\r
-                type enumeration {\r
-                    enum "Y";\r
-                    enum "N";\r
-                }\r
-            }\r
-        }\r
-    }\r
-    grouping vnf-topology {\r
-        leaf vnf-id {\r
-            type string;\r
-            description "vf-module-id";\r
-        }\r
-        uses vnf-topology-information;\r
-    }\r
-\r
-\r
-    rpc vnf-topology-operation {\r
-        input {\r
-            uses sdnc-request-header;\r
-            uses request-information;\r
-            uses service-information;\r
-            uses vnf-request-information;\r
-        }\r
-        output {\r
-            uses vnf-topology-response-body;\r
-            uses vnf-information;\r
-            uses service-information;\r
-        }\r
-    }\r
-\r
-    rpc network-topology-operation {\r
-        input {\r
-            uses sdnc-request-header;\r
-            uses request-information;\r
-            uses service-information;\r
-            uses network-request-information;\r
-        }\r
-        output {\r
-            uses vnf-topology-response-body;\r
-            uses network-information;\r
-            uses service-information;\r
-        }\r
-    }\r
-\r
-    rpc preload-vnf-topology-operation {\r
-        input {\r
-            uses sdnc-request-header;\r
-            uses request-information;\r
-            uses vnf-topology-information;\r
-        }\r
-        output {\r
-            uses vnf-topology-response-body;\r
-        }\r
-    }\r
-\r
-    rpc preload-network-topology-operation {\r
-        input {\r
-            uses sdnc-request-header;\r
-            uses request-information;\r
-            uses network-topology-information;\r
-        }\r
-        output {\r
-            uses vnf-topology-response-body;\r
-        }\r
-    }\r
-}\r
+module VNF-API {
+
+    yang-version 1;
+
+    namespace "org:onap:sdnctl:vnf";
+
+    prefix vnfapi;
+
+    import ietf-inet-types { prefix "ietf"; revision-date "2010-09-24"; }
+
+    include "vnfsubmodule";
+
+    organization "ONAP";
+
+    contact
+    "Network Controller <onap-sdnc@lists.onap.org>";
+
+    description
+        "Defines API interface for VNF Orchestration";
+
+    revision "2015-07-20" {
+        description
+            "Initial draft";
+    }
+    // Last updated on 8-17-2016
+    grouping sdnc-request-header {
+        container sdnc-request-header {
+            leaf svc-request-id {
+                type string;
+            }
+            leaf svc-action {
+                type enumeration {
+                    enum "reserve";
+                    enum "assign";
+                    enum "activate";  // equal to commit
+                    enum "delete";    // equal to commit
+                    enum "changeassign";
+                    enum "changedelete";
+                    enum "rollback";
+                }
+            }
+            leaf svc-notification-url {
+                type string;
+            }
+        }
+    }
+
+    grouping request-information {
+        container request-information {
+            leaf request-id {
+                type string;
+            }
+            leaf request-action {
+                type enumeration {
+                    enum "PreloadNetworkRequest";
+                    enum "DeletePreloadNetworkRequest";
+                    enum "NetworkActivateRequest";
+                    enum "DisconnectNetworkRequest";
+                    enum "PreloadVNFRequest";
+                    enum "DeletePreloadVNFRequest";
+                    enum "VNFActivateRequest";
+                    enum "ChangeVNFActivateRequest";
+                    enum "DisconnectVNFRequest";
+                    enum "PreloadVnfInstanceRequest";
+                    enum "DeletePreloadVnfInstanceRequest";
+                    enum "VnfInstanceActivateRequest";
+                    enum "ChangeVnfInstanceActivateRequest";
+                    enum "DisconnectVnfInstanceRequest";
+                    enum "PreloadVfModuleRequest";
+                    enum "DeletePreloadVfModuleRequest";
+                    enum "VfModuleActivateRequest";
+                    enum "ChangeVfModuleActivateRequest";
+                    enum "DisconnectVfModuleRequest";
+                }
+            }
+            leaf request-sub-action {
+                type enumeration {
+                    enum "SUPP";
+                    enum "CANCEL";
+                    enum "RetainResource";
+                }
+            }
+            leaf source {
+                type string;
+            }
+            leaf notification-url {
+                type string;
+            }
+            leaf order-number {
+                type string;
+            }
+            leaf order-version {
+                type string;
+            }
+        }
+    }
+
+    grouping service-information {
+        container service-information {
+            leaf service-type {
+                type string;
+                description "AnAI subscription-service-type";
+            }
+            leaf service-id {
+                type string;
+            }
+            leaf service-instance-id {
+                type string;
+                description "A service instance that a VNF or a l3-network is associated with";
+            }
+            leaf subscriber-name {
+                type string;
+                description "AnAI global-customer-id";
+            }
+        }
+    }
+
+
+    grouping vnf-request-information {
+        container vnf-request-information {
+            leaf vnf-request-version {
+                type string;
+            }
+            leaf model-customization-uuid {
+                type string;
+                description "customized resource, i.e. vf-module, for use within a given service";
+            }
+            leaf use-preload {
+                type enumeration {
+                    enum "Y";
+                    enum "N";
+                }
+                description "orchestrate vf-module with full preload data or TOSCA lookup plus EIPAM automation";
+            }
+            leaf vnf-id {
+                type string;
+                description "vf-module-id";
+            }
+            leaf vnf-type {
+                type string;
+                description "vf-module-type";
+            }
+            leaf vnf-name {
+                type string;
+                description "vf-module-name";
+            }
+            leaf generic-vnf-id {
+                type string;
+                description "generic vnf-id";
+            }
+            leaf generic-vnf-type {
+                type string;
+                description "generic vnf type";
+            }
+            leaf generic-vnf-name {
+                type string;
+                description "generic vnf name";
+            }
+            leaf tenant {
+                type string;
+            }
+            leaf aic-clli {
+                type string;
+            }
+            leaf aic-cloud-region {
+                type string;
+                description "The AIC cloud region which maps to contrail versions";
+            }
+            list vnf-networks {
+                key network-role;
+                uses vnf-network;
+                description "Network List";
+            }
+        }
+    }
+
+    grouping network-request-information {
+        container network-request-information {
+            leaf network-id {
+                type string;
+            }
+            leaf network-type {
+                type string;
+            }
+            leaf network-name {
+                type string;
+            }
+            leaf tenant {
+                type string;
+            }
+            leaf aic-clli {
+                type string;
+            }
+            leaf aic-cloud-region {
+                type string;
+                description "The AIC cloud region which maps to contrail versions";
+            }
+        }
+    }
+
+    /***********************************************************/
+    /*               PRELOAD DATA                                 */
+    /***********************************************************/
+
+    container preload-vnfs {
+        uses preload-model-information;
+    }
+    grouping preload-model-information {
+        list vnf-preload-list {
+            key "vnf-name vnf-type";
+            leaf vnf-name {
+                type string;
+                description "vf-module-name";
+            }
+            leaf vnf-type {
+                type string;
+                description "vf-module-type";
+            }
+            uses preload-data;
+        }
+    }
+
+    // For preload networks it will have network-topology-information
+    // For preload vnfs, it will have vnf-topology-information
+    grouping preload-data {
+        container preload-data {
+            uses vnf-topology-information;
+            uses network-topology-information;
+            uses oper-status;
+        }
+    }
+
+
+    grouping vnf-topology-information {
+        container vnf-topology-information {
+            uses vnf-topology-identifier;
+            uses vnf-assignments;
+            uses vnf-parameters;
+        }
+    }
+
+    grouping vnf-topology-identifier {
+        container vnf-topology-identifier {
+            leaf service-type {
+                type string;
+            }
+            leaf service-id {
+                type string;
+            }
+            leaf vnf-name {
+                type string;
+                description "vf-module-name";
+            }
+            leaf vnf-type {
+                type string;
+                description "vf-module-type";
+            }
+            leaf generic-vnf-name {
+                type string;
+            }
+            leaf generic-vnf-type {
+                type string;
+            }
+            leaf generic-vnf-id {
+                type string;
+            }
+        }
+    }
+
+    grouping vnf-assignments {
+        container vnf-assignments {
+            leaf vnf-status {
+                type string;
+                description "Orchestration Status from AAI - to be set by SDNC";
+            }
+            list availability-zones {
+                key "availability-zone";
+                ordered-by  user;
+                leaf availability-zone {
+                    type string;
+                    description "Openstack availability zone name or UUID";
+                }
+            }
+            list vnf-networks {
+                key network-role;
+                uses vnf-network;
+                uses sriov-vlan-filter-list;
+                description "Network List";
+            }
+            uses vm-topology;
+        }
+    }
+
+    grouping vm-topology {
+        list vnf-vms {
+            key vm-type;
+            leaf vm-type {
+                type string;
+            }
+            leaf vm-count {
+                type uint8;
+            }
+            list vm-names {
+                ordered-by user;
+                key "vm-name";
+                leaf vm-name {
+                    type string;
+                }
+                list vnfc-names {
+                    ordered-by user;
+                    key "vnfc-name";
+                    leaf vnfc-name {
+                        type string;
+                    }
+                    list vnfc-networks {
+                        key vnfc-network-role;
+                        uses vnfc-network;
+                    }
+                }
+            }
+            list vm-networks {
+                key network-role;
+                uses vm-network;
+                description "Network List";
+            }
+        }
+    }
+    
+    grouping vnfc-network {
+        leaf vnfc-network-role {
+            type string;
+        }
+        list vnfc-subnets {
+            key "vnfc-subnet-role";
+            leaf vnfc-subnet-role {
+                type string;
+        }
+        list vnfc-ipassignments {
+            key "vnfc-address-family";
+            leaf vnfc-address-family {
+                description "Subnet Version tells if this is IpV4 or IpV6";
+                type enumeration {
+                    enum "ipv4";
+                    enum "ipv6";
+                }
+            }
+            leaf vnfc-subnet-dhcp {
+                description "Indicator to use DHCP on this network for this VNFC. Unless dhcp=N, we wouldnt have any address, since they would not be sdnc assigned ";
+                type enumeration {
+                    enum "Y";
+                    enum "N";
+                }
+            }
+            leaf vnfc-subnet-ipcount {
+                description "The number of ip addresses to be assigned per vnfc for this subnet role";
+                type uint8;
+            }
+            list vnfc-subnet-ips {
+                key "vnfc-client-key";
+                leaf vnfc-client-key {
+                    type string;
+                }
+                leaf ip-type {
+                    description "Capture what type of IP this is, if is virtual IP (AKA, floating IP) or Fixed IP. ";
+                    type enumeration {
+                        enum "FIXED";
+                        enum "VIP";
+                    }
+               }
+               leaf vnfc-address-ipv4 {
+                    description "Either IpV4 IP addresses or IpV6 IP addresses should be present,  but not both within one VnfcVersion. ";
+                    type inet:ip-address;
+               }
+               leaf vnfc-address-ipv6 {
+                    description "Either IpV4 IP addresses or IpV6 IP addresses should be present,  but not both within one VnfcVersion.";
+                    type inet:ipv6-address;
+               }
+            }
+         }
+      }
+   }
+
+    grouping vnf-network {
+        leaf network-role {
+            type string;
+            description "A Network Role to which a VNF must connect";
+        }
+        leaf network-role-tag {
+            type string;
+            description "The network-role that maps to the HEAT parameter {network-role}_net_id";
+        }
+        leaf network-name {
+            type string;
+            description "Unique Neutron UUID of an instance of the network role ";
+        }
+        leaf neutron-id {
+            type string;
+            description "Unique Neutron UUID of an instance of the network role ";
+        }
+        leaf network-id {
+            type string;
+            description "Unique Neutron UUID of an instance of the network role ";
+        }
+        leaf subnet-id {
+            type string;
+            description "ipv4 subnet UUID to be passed into the HEAT template for DHCP assignment";
+        }
+        leaf contrail-network-fqdn {
+            type string;
+            description "contrail network policy object";
+        }
+        leaf ipv6-subnet-id {
+            type string;
+            description "ipv6 subnet UUID to be passed into the HEAT template for DHCP assignment";
+        }
+        leaf ipv6-subnet-name {
+            type string;
+            description "ipv6 subnet-name that corresponds to the ipv6 subnet-id";
+        }
+        leaf subnet-name {
+            type string;
+            description "ipv4 subnet-name that corresponds to the ipv4 subnet-id";
+        }
+        leaf ipv4-key-subnet-id {
+            description "Unique SDN-C generated UUID of the ipv4 subnet.Key into A&AI instance.";
+            type string;
+        }
+        leaf ipv6-key-subnet-id {
+            description "Unique SDN-C generated UUID of the ipv6 subnet.Key into A&AI instance.";
+            type string;
+        }
+        leaf subnet-role {
+            type string;
+        }
+    }
+
+    grouping sriov-vlan-filter-list {
+        list sriov-vlan-filter-list {
+            key "sriov-vlan-filter";
+            leaf sriov-vlan-filter {
+                type string;
+            }
+        }
+    }
+
+    grouping vm-network {
+        leaf network-role {
+            type string;
+            description "network (identified by role) that this VM connects to.  Should also be included in the vnf-networks for the containing VNF";
+        }
+        leaf network-role-tag {
+            type string;
+            description "The network-role that maps to the HEAT parameter {network-role}_net_id";
+        }
+        leaf use-dhcp {
+            type enumeration {
+                  enum "Y";
+                  enum "N";
+            }
+            description "Indicator to use DHCP on this network for this VM";
+        }
+        leaf ip-count {
+            type uint8;
+            description "The number of ip addresses to be assigned per vm for this network role";
+        }
+        leaf ip-count-ipv6 {
+            type uint8;
+            description "The number of ipv6 addresses to be assigned per vm for this network role";
+        }
+        list network-ips {
+            ordered-by user;
+            key ip-address;
+            leaf ip-address {
+                type ietf:ip-address;
+                description "List of assigned ipv4 addresses on a network";
+            }
+        }
+        list network-ips-v6 {
+            ordered-by user;
+            key ip-address-ipv6;
+            leaf ip-address-ipv6 {
+                type ietf:ipv6-address;
+                description "List of assigned ipv6 addresses on a network";
+            }
+        }
+        list network-macs {
+            ordered-by user;
+            key mac-address;
+            leaf mac-address {
+                type string;
+                description "List of network assignments for this VM (one per network)";
+            }
+        }
+        leaf floating-ip {
+            type ietf:ip-address;
+            description "Floating ipv4 for VMs of a given type on this network";
+        }
+        leaf floating-ip-v6 {
+            type ietf:ipv6-address;
+            description "Floating ipv6 for VMs of a given type on this network";
+        }
+        list interface-route-prefixes {
+            ordered-by user;
+            key interface-route-prefix;
+            leaf interface-route-prefix {
+                type ietf:ip-address;
+                description "OBSOLETE, route prefixes (CIDRs) to be provided to MSO in vnf-topology as a list of static routes";
+            }
+            leaf interface-route-prefix-cidr {
+                type string;
+                description "route prefixes (CIDRs) in ip/cidr format to be provided to MSO in vnf-topology as a list of static routes";
+            }
+        }
+    }
+
+    grouping vnf-parameters {
+        list vnf-parameters {
+            key vnf-parameter-name;
+            leaf vnf-parameter-name {
+                type string;
+                description "The name of an arbitrary instance-specific vnf-parameters";
+            }
+            leaf vnf-parameter-value {
+                type string;
+                description "The value of an arbitrary instance-specific vnf-parameters ";
+            }
+        }
+    }
+
+    grouping network-topology-information {
+        container network-topology-information {
+            uses network-topology-identifier;
+            uses subnets;
+            uses vpn-bindings;
+            uses network-policy;
+            uses route-table-reference;
+            uses provider-network-information;
+        }
+    }
+
+    grouping network-topology-identifier {
+        container network-topology-identifier {
+            leaf service-type {
+                type string;
+            }
+            leaf network-name {
+                type string;
+            }
+            leaf network-role {
+                type string;
+            }
+            leaf network-type {
+                type string;
+            }
+            leaf network-technology{
+                type string;
+            }
+        }
+    }
+    grouping subnets {
+        list subnets {
+            key start-address;
+            leaf start-address{
+                type ietf:ip-address;
+            }
+            leaf gateway-address{
+                type ietf:ip-address;
+            }
+            leaf cidr-mask{
+                type string;
+            }
+            leaf ip-version {
+                type string;
+            }
+            leaf dhcp-enabled {
+                type enumeration {
+                    enum "Y";
+                    enum "N";
+                }
+            }
+            leaf dhcp-start-address {
+                type string;
+            }
+            leaf dhcp-end-address {
+                type string;
+            }
+            leaf subnet-name {
+                type string;
+            }
+            leaf addr-from-start {
+                description "Default is N";
+                type enumeration {
+                    enum "Y";
+                    enum "N";
+                }
+            }
+            leaf subnet-role {
+                type string;
+            }
+            uses host-routes;
+        }
+    }
+
+    grouping vpn-bindings {
+        list vpn-bindings {
+            key vpn-binding-id;
+            leaf vpn-binding-id {
+                type string;
+            }
+            leaf global-route-target {
+                type string;
+            }
+        }
+    }
+
+    grouping network-policy {
+        list network-policy {
+            key network-policy-fqdn;
+            leaf network-policy-fqdn {
+                type string;
+            }
+            leaf network-policy-id {
+                type string;
+            }
+        }
+    }
+
+    grouping route-table-reference {
+        list route-table-reference {
+            key "route-table-reference-id";
+            leaf route-table-reference-id {
+                type string;
+            }
+            leaf route-table-reference-fqdn {
+                type string;
+            }
+        }
+    }
+
+    grouping provider-network-information {
+        container provider-network-information {
+            leaf physical-network-name {
+                type string;
+            }
+            leaf is-provider-network {
+                type boolean;
+            }
+            leaf is-shared-network {
+                type boolean;
+            }
+            leaf is-external-network {
+                type boolean;
+            }
+        }
+    }
+
+    grouping host-routes {
+        list host-routes {
+            key "route-prefix";
+            leaf route-prefix {
+                type string;
+            }
+            leaf next-hop {
+                description "Could be ip-address or hostname or service-instance";
+                type string;
+            }
+        }
+    }
+
+    /***********************************************************/
+    /*               SERVICE_DATA                                */
+    /***********************************************************/
+    container vnfs {
+        uses vnf-model-infrastructure;
+    }
+    grouping vnf-model-infrastructure {
+        list vnf-list {
+            key vnf-id;
+            leaf vnf-id {
+                type string;
+                mandatory true;
+                description "vf-module-id";
+            }
+            uses service-data;
+            uses service-status;
+        }
+    }
+    grouping service-data {
+        container service-data {
+            uses vnf-configuration-information;
+            uses oper-status;
+        }
+    }
+    grouping service-status {
+        container service-status {
+            leaf response-code {
+                type string;
+            }
+            leaf response-message {
+                type string;
+            }
+            leaf final-indicator {
+                type string;
+            }
+            leaf request-status {
+                type enumeration {
+                    enum "synccomplete";
+                    enum "asynccomplete";
+                    enum "notifycomplete";
+                }
+            }
+            leaf vnfsdn-action {
+                type enumeration {
+                    enum "PreloadNetworkRequest";
+                    enum "DeletePreloadNetworkRequest";
+                    enum "NetworkActivateRequest";
+                    enum "DisconnectNetworkRequest";
+                    enum "PreloadVNFRequest";
+                    enum "DeletePreloadVNFRequest";
+                    enum "VNFActivateRequest";
+                    enum "ChangeVNFActivateRequest";
+                    enum "DisconnectVNFRequest";
+                    enum "PreloadVnfInstanceRequest";
+                    enum "DeletePreloadVnfInstanceRequest";
+                    enum "VnfInstanceActivateRequest";
+                    enum "ChangeVnfInstanceActivateRequest";
+                    enum "DisconnectVnfInstanceRequest";
+                    enum "PreloadVfModuleRequest";
+                    enum "DeletePreloadVfModuleRequest";
+                    enum "VfModuleActivateRequest";
+                    enum "ChangeVfModuleActivateRequest";
+                    enum "DisconnectVfModuleRequest";
+                }
+            }
+            leaf vnfsdn-subaction {
+                type enumeration {
+                    enum "SUPP";
+                    enum "CANCEL";
+                    enum "RetainResource";
+                }
+            }
+            leaf rpc-name {
+                type enumeration {
+                    enum "vnf-topology-operation";
+                    enum "preload-vnf-topology-operation";
+                    enum "vnf-instance-topology-operation";
+                    enum "preload-vnf-instance-topology-operation";
+                    enum "vf-module-topology-operation";
+                    enum "preload-vf-module-topology-operation";
+                }
+            }
+            leaf rpc-action {
+                type enumeration {
+                    enum "reserve";
+                    enum "assign";
+                    enum "activate";  // equal to commit
+                    enum "delete";      // equal to commit
+                    enum "changeassign";
+                    enum "changedelete";
+                    enum "rollback";
+                }
+            }
+            leaf response-timestamp {
+                type string;
+            }
+        }
+    }
+    grouping vnf-configuration-information {
+        uses sdnc-request-header;
+        uses request-information;
+        uses service-information;
+        uses vnf-request-information;
+        uses vnf-topology;
+    }
+    grouping vnf-topology-response-body {
+        leaf svc-request-id {
+            type string;
+        }
+        leaf response-code {
+            type string;
+        }
+        leaf response-message {
+            type string;
+        }
+        leaf ack-final-indicator {
+            type string;
+        }
+    }
+
+    grouping vnf-information {
+        container vnf-information {
+            leaf vnf-service-type {
+                type string;
+            }
+            leaf vnf-id {
+                type string;
+                description "vf-module-id";
+            }
+        }
+    }
+
+    grouping network-information {
+        container network-information {
+            leaf network-service-type {
+                type string;
+            }
+            leaf network-id {
+                type string;
+            }
+        }
+    }
+
+
+    // Carried over from l3sdn and potentially not needed
+    grouping oper-status {
+        container oper-status {
+            leaf order-status {
+                type enumeration {
+                    enum "Active";
+                    enum "PendingAssignment";
+                    enum "PendingCreate";
+                    enum "PendingUpdate";
+                    enum "PendingDelete";
+                    enum "Deleted";
+
+                }
+            }
+            leaf last-action {
+                type enumeration {
+                    enum "VNFActivateRequest";
+                    enum "ChangeVNFActivateRequest";
+                    enum "VnfInstanceActivateRequest";
+                    enum "ChangeVnfInstanceActivateRequest";
+                    enum "VfModuleActivateRequest";
+                    enum "ChangeVfModuleActivateRequest";
+                    enum "DisconnectVNFRequest";
+                    enum "DisconnectVnfInstanceRequest";
+                    enum "DisconnectVfModuleRequest";
+                    enum "PreloadVNFRequest";
+                    enum "DeletePreloadVNFRequest";
+                    enum "PreloadVnfInstanceRequest";
+                    enum "DeletePreloadVnfInstanceRequest";
+                    enum "PreloadVfModuleRequest";
+                    enum "DeletePreloadVfModuleRequest";
+                }
+            }
+            leaf last-svc-request-id {
+                type string;
+            }
+            leaf last-order-status {
+                type enumeration {
+                    enum "Active";
+                    enum "PendingAssignment";
+                    enum "PendingCreate";
+                    enum "PendingUpdate";
+                    enum "PendingDelete";
+                    enum "Deleted";
+                }
+            }
+            leaf create-timestamp {
+                type string;
+            }
+            leaf modify-timestamp {
+                type string;
+            }
+            leaf maintenance-indicator {
+                type enumeration {
+                    enum "Y";
+                    enum "N";
+                }
+            }
+        }
+    }
+    grouping vnf-topology {
+        leaf vnf-id {
+            type string;
+            description "vf-module-id";
+        }
+        uses vnf-topology-information;
+    }
+
+
+    rpc vnf-topology-operation {
+        input {
+            uses sdnc-request-header;
+            uses request-information;
+            uses service-information;
+            uses vnf-request-information;
+        }
+        output {
+            uses vnf-topology-response-body;
+            uses vnf-information;
+            uses service-information;
+        }
+    }
+
+    rpc network-topology-operation {
+        input {
+            uses sdnc-request-header;
+            uses request-information;
+            uses service-information;
+            uses network-request-information;
+        }
+        output {
+            uses vnf-topology-response-body;
+            uses network-information;
+            uses service-information;
+        }
+    }
+
+    rpc preload-vnf-topology-operation {
+        input {
+            uses sdnc-request-header;
+            uses request-information;
+            uses vnf-topology-information;
+        }
+        output {
+            uses vnf-topology-response-body;
+        }
+    }
+
+    rpc preload-network-topology-operation {
+        input {
+            uses sdnc-request-header;
+            uses request-information;
+            uses network-topology-information;
+        }
+        output {
+            uses vnf-topology-response-body;
+        }
+    }
+}