Commit 0df8078a authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

update of importing variables for descriptors

parent 69c9dcdd
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -11,8 +11,8 @@ Library Collections
Library    JSONSchemaLibrary    schemas/
Library    String
Library    Process
Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml
#Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
#Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml

*** Keywords ***
Create Sessions 
@@ -1099,6 +1099,7 @@ PARSE the Descriptor File
    Run Keyword If  '${descriptorType}'=='SOL001'    Fetch Information from SOL001 descriptor file    ELSE    Fetch Information from SOL006 descriptor file
    
Fetch Information from SOL001 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
    @{VDU_labels}=    Create List
    @{VNF_labels}=    Create List
    @{VirtualLink_labels}=    Create List
@@ -1125,6 +1126,7 @@ Fetch Information from SOL001 descriptor file
    Set Global Variable    @{Storage_IDs}    @{Storage_labels}

Get VNF Attributes from SOL001
    Import Variables    ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
    [Arguments]    ${VNF_label}
    ${descriptor_id}=    Get Variable Value    ${topology_template.node_templates.${VNF_label}.properties.descriptor_id}
    ${provider}=    Get Variable Value    ${topology_template.node_templates.${VNF_label}.properties.provider}
@@ -1141,6 +1143,7 @@ Get VNF Attributes from SOL001
    Set Global Variable    ${Flavour_ID}    ${flavour_id}

Fetch Information from SOL006 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    ${descriptor_id}=    Get Variable Value    ${nfv.vnfd[0].id}
    ${provider}=    Get Variable Value    ${nfv.vnfd[0].provider}
    ${product_name}=    Get Variable Value    ${nfv.vnfd[0]['product-name']}
@@ -1168,6 +1171,7 @@ Fetch Information from SOL006 descriptor file

Get VDU IDs
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml    
    @{VDU_labels}=    Create List
    ${Storage_labels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
@@ -1180,6 +1184,7 @@ Get VDU IDs
            
Get Internal CPs for each VDU
    [Arguments]    ${vdu}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    ${count}=    Get Length    ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']}    
    ${internal_CPs}=    Create List
    FOR    ${i}    IN RANGE    ${count}
@@ -1189,6 +1194,7 @@ Get Internal CPs for each VDU
    
Get External CP IDs
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml 
    @{external_CPs}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${external_CPs}    ${nfv.vnfd[0]['ext-cpd'][${i}]['id']} 
@@ -1197,6 +1203,7 @@ Get External CP IDs

Get Virtual Link IDs
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml 
    ${VirtualLink_labels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${VirtualLink_labels}    ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} 
@@ -1205,6 +1212,7 @@ Get Virtual Link IDs

Get Instantiation Levels
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    @{Instantiation_Levels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${Instantiation_Levels}    ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} 
+14 −6
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ Library JSONLibrary
Library    Collections
Library    Process
Library    JSONSchemaLibrary    schemas/
Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml
#Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
#Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml

*** Keywords ***
Create Sessions   
@@ -1464,6 +1464,7 @@ PARSE the Descriptor File
    Run Keyword If  '${descriptorType}'=='SOL001'    Fetch Information from SOL001 descriptor file    ELSE    Fetch Information from SOL006 descriptor file
    
Fetch Information from SOL001 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
    @{VDU_labels}=    Create List
    @{VNF_labels}=    Create List
    @{VirtualLink_labels}=    Create List
@@ -1491,6 +1492,7 @@ Fetch Information from SOL001 descriptor file

Get VNF Attributes from SOL001
    [Arguments]    ${VNF_label}
    Import Variables    ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
    ${descriptor_id}=    Get Variable Value    ${topology_template.node_templates.${VNF_label}.properties.descriptor_id}
    ${provider}=    Get Variable Value    ${topology_template.node_templates.${VNF_label}.properties.provider}
    ${product_name}=    Get Variable Value    ${topology_template.node_templates.${VNF_label}.properties.product_name}
@@ -1507,6 +1509,7 @@ Get VNF Attributes from SOL001


Fetch Information from SOL006 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    ${descriptor_id}=    Get Variable Value    ${nfv.vnfd[0].id}
    ${provider}=    Get Variable Value    ${nfv.vnfd[0].provider}
    ${product_name}=    Get Variable Value    ${nfv.vnfd[0]['product-name']}
@@ -1534,6 +1537,7 @@ Fetch Information from SOL006 descriptor file
    
Get VDU IDs
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    @{VDU_labels}=    Create List
    ${Storage_labels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
@@ -1546,6 +1550,7 @@ Get VDU IDs
            
Get Internal CPs for each VDU
    [Arguments]    ${vdu}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    ${count}=    Get Length    ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']}    
    ${internal_CPs}=    Create List
    FOR    ${i}    IN RANGE    ${count}
@@ -1555,6 +1560,7 @@ Get Internal CPs for each VDU
    
Get External CP IDs
    [Arguments]    ${count} 
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml   
    @{external_CPs}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${external_CPs}    ${nfv.vnfd[0].ext_cpd[${i}].id} 
@@ -1563,6 +1569,7 @@ Get External CP IDs

Get Virtual Link IDs
    [Arguments]    ${count} 
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml   
    ${VirtualLink_labels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${VirtualLink_labels}    ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} 
@@ -1571,6 +1578,7 @@ Get Virtual Link IDs

Get Instantiation Levels
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    @{Instantiation_Levels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${Instantiation_Levels}    ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} 
+4 −2
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ Library OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    Collections
Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml
#Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
#Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml
Documentation    This resource represents grants. The client can use this resource to obtain permission
...     from the NFVO to perform a particular VNF lifecycle operation.

@@ -216,6 +216,7 @@ PARSE the Descriptor File
    Run Keyword If  '${descriptorType}'=='SOL001'    Fetch Information from SOL001 descriptor file    ELSE    Fetch Information from SOL006 descriptor file
    
Fetch Information from SOL001 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
    ${descriptor_id}=    Get Variable Value    ${topology_template.node_templates.properties.descriptor_id}
    ${provider}=    Get Variable Value    ${topology_template.node_templates.properties.provider}
    ${product_name}=    Get Variable Value    ${topology_template.node_templates.properties.product_name}
@@ -230,6 +231,7 @@ Fetch Information from SOL001 descriptor file
    Set Global Variable    ${Flavour_ID}    ${flavour_id}
    
Fetch Information from SOL006 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    ${descriptor_id}=    Get Variable Value    ${nfv.vnfd[0].id}
    ${provider}=    Get Variable Value    ${nfv.vnfd[0].provider}
    ${product_name}=    Get Variable Value    ${nfv.vnfd[0]['product-name']}
+10 −5
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@ Library JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    Collections
Library    REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml
#Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
#Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml
Documentation    This resource represents an individual grant. The client can use this resource to read the grant.
...    It is determined by means outside the scope of the present document, such as configuration or policy,
...    how long an individual grant is available.
@@ -176,6 +176,7 @@ PARSE the Descriptor File
    Run Keyword If  '${descriptorType}'=='SOL001'    Fetch Information from SOL001 descriptor file    ELSE    Fetch Information from SOL006 descriptor file
    
Fetch Information from SOL001 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
    @{VDU_labels}=    Create List
    @{VirtualLink_labels}=    Create List
    @{CP_labels}=    Create List
@@ -193,6 +194,7 @@ Fetch Information from SOL001 descriptor file
    Set Global Variable    @{CP_IDs}    @{CP_labels}
    
Fetch Information from SOL006 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    ${VDUcount}=    Get Length    ${nfv.vnfd[0].vdu}
    ${extCP_count}=    Get Length    ${nfv.vnfd[0]['ext-cpd']}
    ${virtualLink_count}=    Get length    ${nfv.vnfd[0]['int-virtual-link-desc']}
@@ -207,6 +209,7 @@ Fetch Information from SOL006 descriptor file
        
Get VDU IDs
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    @{VDU_labels}=    Create List
    @{Compute_labels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
@@ -218,6 +221,7 @@ Get VDU IDs
                
Get External CP IDs
    [Arguments]    ${count}
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml    
    @{external_CPs}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${external_CPs}    ${nfv.vnfd[0].ext_cpd[${i}].id} 
@@ -226,6 +230,7 @@ Get External CP IDs

Get Virtual Link IDs
    [Arguments]    ${count}  
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml  
    ${VirtualLink_labels}=    Create List
    FOR    ${i}    IN RANGE    ${count}
        Append To List    ${VirtualLink_labels}    ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} 
+4 −2
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ Library Collections
Library    JSONSchemaLibrary    schemas/
Library    Process
Library    String
Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml
#Variables    descriptors/SOL001/VNFD/vnfd_SOL001.yaml
#Variables    descriptors/SOL006/VNFD/vnfd_SOL006.yaml

*** Keywords ***
Get all VNF Packages
@@ -1562,6 +1562,7 @@ PARSE the Descriptor File
    Run Keyword If  '${descriptorType}'=='SOL001'    Fetch Information from SOL001 descriptor file    ELSE    Fetch Information from SOL006 descriptor file    
    
Fetch Information from SOL001 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml
    ${descriptor_id}=    Get Variable Value    ${topology_template.node_templates.properties.descriptor_id}
    ${provider}=    Get Variable Value    ${topology_template.node_templates.properties.provider}
    ${product_name}=    Get Variable Value    ${topology_template.node_templates.properties.product_name}
@@ -1574,6 +1575,7 @@ Fetch Information from SOL001 descriptor file
    Set Global Variable    ${Descriptor_Version}    ${descriptor_version}
    
Fetch Information from SOL006 descriptor file
    Import Variables    ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml
    ${descriptor_id}=    Get Variable Value    ${nfv.vnfd[0].id}
    ${provider}=    Get Variable Value    ${nfv.vnfd[0].provider}
    ${product_name}=    Get Variable Value    ${nfv.vnfd[0]['product-name']}
Loading