Commit bede9ed1 authored by uihassan's avatar uihassan
Browse files

Descriptors for 7.3.1.2.2

parent 04d98519
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ Get Information about an individual VNF Instance
    GET individual vnfInstance
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    vnfInstance
    Check HTTP Response Body vnfInstance content against VNF Descriptor
    
PUT Individual VNFInstance - Method not implemented 
    [Documentation]    Test ID: 7.3.1.2.3
+30 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ Library BuiltIn
Library    JSONLibrary
Library    Collections
Library    JSONSchemaLibrary    schemas/
Variables    descriptors/vnf-b-1_VNF.yaml

*** Keywords ***
Get Vnf Instance 
@@ -1180,3 +1181,32 @@ GET test endpoint
Check HTTP Response Header Contain Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
    
Check HTTP Response Body vnfInstance content against VNF Descriptor
    Run Keyword If  '${descriptorType}'=='SOL001'  Parse SOL001    ELSE    Parse SOL006
    
Parse SOL001
    FOR    ${key}    IN    @{topology_template.node_templates.keys()} 
        Log    ${key}
        ${check1}=    Run Keyword And Return Status    Should End With    ${key}    VNF
        Run Keyword If     ${check1}     Set Global Variable    ${vnfKey}    ${key}   
    END
    
    ${descriptor_id}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.descriptor_id}
    ${provider}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.provider}
    ${product_name}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.product_name}
    ${software_version}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.software_version}
    ${descriptor_version}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.descriptor_version}
    ${configurable_properties}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.configurable_properties}
    ${flavour_id}=    Get Variable Value    ${topology_template.node_templates.${vnfKey}.properties.flavour_id}
    
    Should Be Equal As Strings    ${response['body']['vnfdId']}    ${descriptor_id}
    Should Be Equal As Strings    ${response['body']['vnfProvider']}    ${provider}
    Should Be Equal As Strings    ${response['body']['vnfProductName']}    ${product_name}
    Should Be Equal As Strings    ${response['body']['vnfSoftwareVesion']}    ${software_version}
    Should Be Equal As Strings    ${response['body']['vnfdVersion']}    ${descriptor_version}
    Should Be Equal As Strings    ${response['body']['vnfConfigurableProperties']}    ${configurable_properties}
    Should Be Equal As Strings    ${response['body']['flavourId']}    ${flavour_id}
    
Parse SOL006
    Log    SOL006 code
 No newline at end of file
+169 −0
Original line number Diff line number Diff line
tosca_definitions_version: tosca_simple_yaml_1_2
description: "TST010 reference VNF-B"
metadata:
  descriptor_id: "VNF-B"
  vendor: "ETSI TST WG"
  version: "2.0"
topology_template:
  substitution_mappings:
    node_type: "tosca.nodes.nfv.VNF"
    requirements:
      virtual_link_management:
        [management, virtual_link_management]
      virtual_link_left:
        [left, virtual_link_left]
      virtual_link_right:
        [right, virtual_link_right]
  node_templates:
    VDU-B-1:
      type: "tosca.nodes.nfv.Vdu.Compute"
      properties:
        name: "vdu-b-1-vcd"
        descriptor: "Description of VDU-B-1"
        vdu_profile:
          min_number_of_instances: 1
          max_number_of_instances: 2
      capabilities:
        virtual_compute:
          properties:
            virtual_memory:
              virtual_mem_size: 4096
              numa_enabled: false
            virtual_cpu:
              num_virtual_cpu: 2
      requirements:
        virtual_storage:
        - "vdu-b-1-vsd"
    VDU-B-2:
      type: "tosca.nodes.nfv.Vdu.Compute"
      properties:
        name: "vdu-b-2-vcd"
        descriptor: "Description of VDU-B-2"
        vdu_profile:
          min_number_of_instances: 1
          max_number_of_instances: 4
      capabilities:
        virtual_compute:
          properties:
            virtual_memory:
              virtual_mem_size: 6144
              numa_enabled: false
            virtual_cpu:
              num_virtual_cpu: 2
      requirements:
        virtual_storage:
        - "vdu-b-2-vsd"
    right:
      type: "tosca.nodes.nfv.VduCp"
      properties:
        order: 1
      requirements:
        virtual_link_right:
        virtual_binding: VDU-B-2
    management:
      type: "tosca.nodes.nfv.VduCp"
      properties:
        order: 0
      requirements:
        virtual_link_management:
        virtual_binding: VDU-B-1
    left:
      type: "tosca.nodes.nfv.VduCp"
      properties:
        order: 2
      requirements:
        virtual_link_left:
        virtual_binding: VDU-B-1
    internal_vl:
      type: tosca.nodes.nfv.VnfVirtualLink
      properties:
        connectivity_type:
          layer_protocols: [ ipv4 ]
        description: Internal Virtual link in the VNF
        vl_profile:
          max_bitrate_requirements:
            root: 100000
            leaf: 20000
          min_bitrate_requirements:
            root: 10000
            leaf: 10000
    internal_vdu_b_1_cp:
      type: tosca.nodes.nfv.VduCp
      properties:
        order: 2
      requirements:
        - virtual_binding: VDU-B-1
        - virtual_link: internal_vl
    internal_vdu_b_2_cp:
      type: tosca.nodes.nfv.VduCp
      properties:
        order: 0
      requirements:
        - virtual_binding: VDU-B-2
        - virtual_link: internal_vl
    vdu-b-1-vsd:
      type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage"
      properties:
        virtual_block_storage_data:
          size_of_storage: 20
          rdma_enabled: false
        sw_image_data:
          name: "vdu-b-1 image"
          version: "1.1"
          checksum: 
            algorithm: "sha-224"
            hash: "somehashfortst010"
          container_format: "bare"
          disk-format: qcow2
          min-disk: '1'
          min-ram: '2'
          size: '1'
      artifacts:
        sw_image:
          type: tosca.artifacts.nfv.SwImage
          file: vdu-b-1.qcow2
    vdu-b-1-vsd:
      type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage"
      properties:
        virtual_block_storage_data:
          size_of_storage: 20
          rdma_enabled: false
        sw_image_data:
          name: "vdu-b-1 image"
          version: "1.1"
          checksum: 
            algorithm: "sha-224"
            hash: "somehashfortst010"
          container_format: "bare"
          disk-format: qcow2
          min-disk: '1'
          min-ram: '2'
          size: '1'
      artifacts:
        sw_image:
          type: tosca.artifacts.nfv.SwImage
          file: vdu-b-2.qcow2
    vnf_b_1_VNF:
      type: "tosca.nodes.nfv.VNF"
      properties:
        descriptor_id: "VNF-B-2VDUs"
        descriptor_version: "2.0"
        provider: "ETSI TST WG"
        product_name: "VNF-B-2VDUs"
        software_version: "2.0"
        product_info_name: "VNF-B-2VDUs"
        product_info_description: "TST010 reference VNF-B with 2 VDUs"
        flavour_id: "VNF-B-2VDU_flavor"
        flavour_description: "VNF-B with 2 VDUs flavor"
        vnfm_info: 
          etsivnfm: 
          - v2.3.1 
        interfaces:
            Vnflcm:
              scale:
                implementation: scale-example.yaml
              terminate:
                implementation: terminate-example.yaml
              operate:
                implementation: operate-example.yaml
+4 −1
Original line number Diff line number Diff line
@@ -98,3 +98,6 @@ ${aspectId}
${scaleOutResponse}

${callbackResp}    localhost

${descriptorType}    SOL001
${vnfKey}    {}
 No newline at end of file