Feature 10944 Change naming of charms
[osm/LCM.git] / osm_lcm / tests / test_db_descriptors.py
index 9304908..d02b011 100644 (file)
@@ -1235,6 +1235,254 @@ db_nsrs_text = """
       vim-network-name: mgmt
     vnfd-id:
     - d96b1cdf-5ad6-49f7-bf65-907ada989293
+
+-   _id: b63aa1ba-996e-43a7-921a-1aca5ccbc63f
+    name: ha_charm-ns2
+    name-ref: ha_charm-ns2
+    short-name: ha_charm-ns2
+    admin-status: ENABLED
+    nsState: BROKEN
+    currentOperation: IDLE
+    currentOperationID:
+    errorDescription: 'Operation: INSTANTIATING.8e72f2b5-f466-4382-88a4-4575c9e07eb8,
+      Stage 5/5: running Day-1 primitives for NS.'
+    deploymentStatus:
+    configurationStatus:
+    - elementType: VDU
+      elementUnderConfiguration: userVM-0
+      status: READY
+    - elementType: VDU
+      elementUnderConfiguration: policyVM-0
+      status: READY
+    - elementType: NS
+      elementUnderConfiguration: b63aa1ba-996e-43a7-921a-1aca5ccbc63f
+      status: BROKEN
+    vcaStatus:
+    nsd:
+      _id: a557cb0f-0dc9-494c-a9bd-69e8079767e7
+      id: nscharm-ns
+      version: '1.0'
+      name: nscharm-ns
+      vnfd-id:
+      - nscharm-user-vnf
+      - nscharm-policy-vnf
+      virtual-link-desc:
+      - id: mgmtnet
+        mgmt-network: true
+        vim-network-name: osm-ext
+      df:
+      - id: default-df
+        vnf-profile:
+        - id: '1'
+          virtual-link-connectivity:
+          - constituent-cpd-id:
+            - constituent-base-element-id: '1'
+              constituent-cpd-id: vnf-mgmt-ext
+            virtual-link-profile-id: mgmtnet
+          vnfd-id: nscharm-user-vnf
+        - id: '2'
+          virtual-link-connectivity:
+          - constituent-cpd-id:
+            - constituent-base-element-id: '2'
+              constituent-cpd-id: vnf-mgmt-ext
+            virtual-link-profile-id: mgmtnet
+          vnfd-id: nscharm-policy-vnf
+      ns-configuration:
+        juju:
+          charm: ns_ubuntu-18.04-amd64.charm
+        config-primitive:
+        - name: add-user
+          parameter:
+          - name: username
+            data-type: STRING
+        initial-config-primitive:
+        - seq: '1'
+          name: config
+          parameter:
+          - name: juju-username
+            value: admin
+          - name: juju-password
+            value: a5611fc6452349cc6e45705d34c501d4
+        - seq: '2'
+          name: add-user
+          parameter:
+          - name: username
+            value: root
+      description: NS with 2 VNFs
+      _admin:
+        userDefinedData: {}
+        revision: 1
+        created: 1658868548.2641
+        modified: 1658868548.89253
+        projects_read:
+        - 51e0e80fe533469d98766caa16552a3e
+        projects_write:
+        - 51e0e80fe533469d98766caa16552a3e
+        onboardingState: ONBOARDED
+        operationalState: ENABLED
+        usageState: NOT_IN_USE
+        storage:
+          fs: mongo
+          path: "/app/storage/"
+          folder: a557cb0f-0dc9-494c-a9bd-69e8079767e7:1
+          pkg-dir: nscharm_ns
+          descriptor: nscharm_ns/nscharm_nsd.yaml
+          zipfile: nscharm_ns.tar.gz
+    datacenter: bad7338b-ae46-43d4-a434-c3337a8054ac
+    resource-orchestrator: osmopenmano
+    description: default description
+    constituent-vnfr-ref:
+    - 303a6ccd-e6f2-4127-96a4-1e3b97956850
+    - 0d0cd621-47db-4eef-a9e8-8edb71a34ea1
+    operational-status: running
+    config-status: failed
+    orchestration-progress: {}
+    create-time: 1658868607.27119
+    nsd-name-ref: nscharm-ns
+    operational-events: []
+    nsd-ref: nscharm-ns
+    nsd-id: a557cb0f-0dc9-494c-a9bd-69e8079767e7
+    vnfd-id:
+    - b5068dc9-a3cd-4a1e-b051-e36c3a9f10a4
+    - 4aa63021-c816-456b-9998-804c5285a85d
+    instantiate_params:
+      nsdId: a557cb0f-0dc9-494c-a9bd-69e8079767e7
+      nsName: ha_charm-ns2
+      nsDescription: default description
+      vimAccountId: bad7338b-ae46-43d4-a434-c3337a8054ac
+      vld:
+      - name: mgmtnet
+        vim-network-name: osm-ext
+    additionalParamsForNs:
+    ns-instance-config-ref: b63aa1ba-996e-43a7-921a-1aca5ccbc63f
+    id: b63aa1ba-996e-43a7-921a-1aca5ccbc63f
+    ssh-authorized-key:
+    flavor:
+    - id: '0'
+      memory-mb: 1024
+      name: userVM-flv
+      storage-gb: '10'
+      vcpu-count: 1
+      vim_info:
+        vim:bad7338b-ae46-43d4-a434-c3337a8054ac:
+          vim_details:
+          vim_id: 17a9ba76-beb7-4ad4-a481-97de37174866
+          vim_message:
+          vim_status: DONE
+    - id: '1'
+      memory-mb: 1024
+      name: policyVM-flv
+      storage-gb: '10'
+      vcpu-count: 1
+      vim_info:
+        vim:bad7338b-ae46-43d4-a434-c3337a8054ac:
+          vim_details:
+          vim_id: 17a9ba76-beb7-4ad4-a481-97de37174866
+          vim_message:
+          vim_status: DONE
+    image:
+    - id: '0'
+      image: ubuntu18.04
+      vim_info:
+        vim:bad7338b-ae46-43d4-a434-c3337a8054ac:
+          vim_details:
+          vim_id: 919fc71a-6acd-4ee3-8123-739a9abbc2e7
+          vim_message:
+          vim_status: DONE
+    - image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
+      vim-type: aws
+      id: '1'
+    - image: Canonical:UbuntuServer:18.04-LTS:latest
+      vim-type: azure
+      id: '2'
+    - image: ubuntu-os-cloud:image-family:ubuntu-1804-lts
+      vim-type: gcp
+      id: '3'
+    affinity-or-anti-affinity-group: []
+    revision: 1
+    vld:
+    - id: mgmtnet
+      mgmt-network: true
+      name: mgmtnet
+      type:
+      vim_info:
+        vim:bad7338b-ae46-43d4-a434-c3337a8054ac:
+          vim_account_id: bad7338b-ae46-43d4-a434-c3337a8054ac
+          vim_network_name: osm-ext
+          vim_details: |
+            {admin_state_up: true, availability_zone_hints: [], availability_zones: [nova], created_at: '2019-10-17T23:44:03Z', description: '', encapsulation: vlan, encapsulation_id: 2148, encapsulation_type: vlan, id: 21ea5d92-24f1-40ab-8d28-83230e277a49, ipv4_address_scope: null,
+              ipv6_address_scope: null, is_default: false, mtu: 1500, name: osm-ext, port_security_enabled: true, project_id: 456b6471010b4737b47a0dd599c920c5, 'provider:network_type': vlan, 'provider:physical_network': physnet1, 'provider:segmentation_id': 2148, revision_number: 1009,
+              'router:external': true, segmentation_id: 2148, shared: true, status: ACTIVE, subnets: [{subnet: {allocation_pools: [{end: 172.21.249.255, start: 172.21.248.1}], cidr: 172.21.248.0/22, created_at: '2019-10-17T23:44:07Z', description: '', dns_nameservers: [],
+                    enable_dhcp: true, gateway_ip: 172.21.251.254, host_routes: [], id: d14f68b7-8287-41fe-b533-dafb2240680a, ip_version: 4, ipv6_address_mode: null, ipv6_ra_mode: null, name: osm-ext-subnet, network_id: 21ea5d92-24f1-40ab-8d28-83230e277a49, project_id: 456b6471010b4737b47a0dd599c920c5,
+                    revision_number: 5, service_types: [], subnetpool_id: null, tags: [], tenant_id: 456b6471010b4737b47a0dd599c920c5, updated_at: '2020-09-14T15:15:06Z'}}], tags: [], tenant_id: 456b6471010b4737b47a0dd599c920c5, type: data, updated_at: '2022-07-05T18:39:02Z'}
+          vim_id: 21ea5d92-24f1-40ab-8d28-83230e277a49
+          vim_message:
+          vim_status: ACTIVE
+    _admin:
+      created: 1658868607.2804
+      modified: 1658868966.10105
+      projects_read:
+      - 51e0e80fe533469d98766caa16552a3e
+      projects_write:
+      - 51e0e80fe533469d98766caa16552a3e
+      nsState: INSTANTIATED
+      current-operation:
+      nslcmop:
+      operation-type:
+      deployed:
+        RO:
+          vnfd: []
+          operational-status: running
+        VCA:
+        - target_element: vnf/1/vdu/userVM/0
+          member-vnf-index: '1'
+          vdu_id: userVM
+          kdu_name:
+          vdu_count_index: 0
+          operational-status: init
+          detailed-status: ''
+          step: initial-deploy
+          vnfd_id: nscharm-user-vnf
+          vdu_name:
+          type: lxc_proxy_charm
+          ee_descriptor_id: vnf-user-ee
+          ee_id: b63aa1ba-996e-43a7-921a-1aca5ccbc63f.app-vnf-3b97956850-z0-vdu-uservm-cnt-z0-eh2hc.2
+          application: app-vnf-3b97956850-z0-vdu-uservm-cnt-z0-eh2hc
+          model: b63aa1ba-996e-43a7-921a-1aca5ccbc63f
+          config_sw_installed: true
+        - target_element: vnf/2/vdu/policyVM/0
+          member-vnf-index: '2'
+          vdu_id: policyVM
+          kdu_name:
+          vdu_count_index: 0
+          operational-status: init
+          detailed-status: ''
+          step: initial-deploy
+          vnfd_id: nscharm-policy-vnf
+          vdu_name:
+          type: lxc_proxy_charm
+          ee_descriptor_id: vnf-policy-ee
+          ee_id: b63aa1ba-996e-43a7-921a-1aca5ccbc63f.app-vnf-db71a34ea1-z0-vdu-policyvm-cnt-z0-tr1oc.0
+          application: app-vnf-db71a34ea1-z0-vdu-policyvm-cnt-z0-tr1oc
+          model: b63aa1ba-996e-43a7-921a-1aca5ccbc63f
+          config_sw_installed: true
+        - target_element: ns
+          member-vnf-index:
+          vdu_id:
+          kdu_name:
+          vdu_count_index: 0
+          operational-status: init
+          detailed-status: ''
+          step: initial-deploy
+          vnfd_id:
+          vdu_name:
+          type: lxc_proxy_charm
+          ee_descriptor_id:
+          ee_id: b63aa1ba-996e-43a7-921a-1aca5ccbc63f.app-qmfbp.1
+          application: app-qmfbp
+          model: b63aa1ba-996e-43a7-921a-1aca5ccbc63f
+          config_sw_installed: true
+        K8s: []
 """
 
 ro_ns_text = """