Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore ListLoad TupleLoad Str Call NameLoad keyword Str keyword Str keyword Str TupleLoad Str Call NameLoad keyword Str keyword Str keyword Str TupleLoad Str Call NameLoad keyword Str keyword Str keyword Str TupleLoad Str Call NameLoad keyword Str keyword Str keyword Str TupleLoad Str Call NameLoad keyword Str keyword Str keyword Str TupleLoad Str Call NameLoad keyword Str keyword Str keyword Str TupleLoad Str Call NameLoad keyword Str keyword Str keyword Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Str NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareIn NameLoad Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore ListLoad TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore ListLoad TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore ListLoad TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num TupleLoad Str Call NameLoad keyword Str keyword Str keyword Num FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Str NameLoad AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Str NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareIn Str Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call AttributeLoad NameLoad attr If CompareIn Str Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call AttributeLoad NameLoad attr If CompareIn Str Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A toscaparser.common exception toscaparser.elements.scalarunit ScalarUnit_Frequency toscaparser.elements.scalarunit ScalarUnit_Size toscaparser.elements.scalarunit ScalarUnit_Time toscaparser.nodetemplate NodeTemplate toscaparser.tests.base TestCase toscaparser.utils.gettextutils _ toscaparser.utils yamlparser ScalarUnitPositiveTest N/A TestCase N/A N/A scenarios N/A N/A mem_size_is_number_Space_MB N/A dict tpl_snippet 
                 server:
                   type: tosca.nodes.Compute
                   capabilities:
                     host:
                       properties:
                         mem_size: 1024 MB
                  property mem_size expected 1024 MB N/A mem_size_is_number_Space_GB N/A dict tpl_snippet 
                 server:
                   type: tosca.nodes.Compute
                   capabilities:
                     host:
                       properties:
                         mem_size: 1     GB
                  property mem_size expected 1 GB N/A mem_size_is_number_NoSpace_GB N/A dict tpl_snippet 
                 server:
                   type: tosca.nodes.Compute
                   capabilities:
                     host:
                       properties:
                         mem_size: 1tiB
                  property mem_size expected 1 TiB N/A mem_size_is_number_Spaces_GB N/A dict tpl_snippet 
                 server:
                   type: tosca.nodes.Compute
                   capabilities:
                     host:
                       properties:
                         mem_size: 1     GIB
                  property mem_size expected 1 GiB N/A mem_size_is_number_Spaces_GB N/A dict tpl_snippet 
                 server:
                   type: tosca.nodes.Compute
                   capabilities:
                     host:
                       properties:
                         mem_size: 1 tib
                  property mem_size expected 1 TiB N/A cpu_frequency_is_float_Space_GHz N/A dict tpl_snippet 
                 server:
                   type: tosca.nodes.Compute
                   capabilities:
                     host:
                       properties:
                         cpu_frequency: 2.5 GHz
                  property cpu_frequency expected 2.5 GHz N/A cpu_frequency_is_float_Space_MHz N/A dict tpl_snippet 
                 server:
                   type: tosca.nodes.Compute
                   capabilities:
                     host:
                       properties:
                         cpu_frequency: 800 MHz
                  property cpu_frequency expected 800 MHz test_scenario_scalar_unit_positive N/A N/A self N/A N/A N/A tpl N/A self tpl_snippet N/A nodetemplates N/A N/A yamlparser simple_parse tpl N/A nodetemplate N/A NodeTemplate server nodetemplates N/A props N/A N/A N/A N/A nodetemplate get_capability host get_properties N/A prop_name N/A self property N/A N/A props N/A prop_name N/A N/A props keys N/A N/A prop N/A props N/A prop_name N/A N/A N/A self assertIsNone N/A N/A prop validate N/A resolved N/A prop value N/A N/A N/A self assertEqual resolved N/A self expected N/A N/A GetNumFromScalarUnitSizePositive N/A TestCase N/A N/A scenarios N/A N/A Input is TB, user input is GB N/A dict InputMemSize 1   TB UserInputUnit gB expected 1000 N/A Input is TiB, user input is GB N/A dict InputMemSize 1   TiB UserInputUnit gB expected 1099.51162778 test_scenario_get_num_from_scalar_unit_size N/A N/A self N/A N/A N/A resolved N/A N/A N/A ScalarUnit_Size N/A self InputMemSize get_num_from_scalar_unit N/A self UserInputUnit N/A N/A N/A self assertEqual resolved N/A self expected N/A N/A GetNumFromScalarUnitFrequencyPositive N/A TestCase N/A N/A scenarios N/A N/A Input is GHz, user input is Hz N/A dict InputMemSize 1   GHz UserInputUnit Hz expected 1000000000 N/A Input is GHz, user input is Hz N/A dict InputMemSize 2.4   GHz UserInputUnit Hz expected 2400000000 N/A Input is MHz, user input is GHz N/A dict InputMemSize 800   MHz UserInputUnit GHz expected 0.8 N/A Input is GHz, user input is Hz N/A dict InputMemSize 0.9  GHz UserInputUnit MHz expected 900 N/A Input is GHz, user input is Hz N/A dict InputMemSize 2.7GHz UserInputUnit MHz expected 2700 test_scenario_get_num_from_scalar_unit_frequency N/A N/A self N/A N/A N/A resolved N/A N/A N/A ScalarUnit_Frequency N/A self InputMemSize get_num_from_scalar_unit N/A self UserInputUnit N/A N/A N/A self assertEqual resolved N/A self expected N/A N/A GetNumFromScalarUnitTimePositive N/A TestCase N/A N/A scenarios N/A N/A Input is 500ms, user input is s N/A dict InputMemSize 500   ms UserInputUnit s expected 0.5 N/A Input is h, user input is s N/A dict InputMemSize 1   h UserInputUnit s expected 3600 N/A Input is m, user input is s N/A dict InputMemSize 0.5   m UserInputUnit s expected 30 N/A Input is d, user input is h N/A dict InputMemSize 1   d UserInputUnit h expected 24 test_scenario_get_num_from_scalar_unit_time N/A N/A self N/A N/A N/A resolved N/A N/A N/A ScalarUnit_Time N/A self InputMemSize get_num_from_scalar_unit N/A self UserInputUnit N/A N/A N/A self assertEqual resolved N/A self expected N/A N/A GetNumFromScalarUnitSizeNegative N/A TestCase N/A N/A InputMemSize 1 GB N/A UserInputUnit qB test_get_num_from_scalar_unit_size_negative N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A ScalarUnit_Size N/A self InputMemSize get_num_from_scalar_unit N/A self UserInputUnit N/A N/A N/A Exception N/A error N/A N/A N/A N/A self assertTrue N/A isinstance error ValueError N/A N/A N/A self assertEqual N/A _ The unit "qB" is not valid. Valid units are "['B', 'GB', 'GiB', 'KiB', 'MB', 'MiB', 'TB', 'TiB', 'kB']". N/A N/A error __str__ N/A N/A GetNumFromScalarUnitFrequencyNegative N/A TestCase N/A N/A InputFrequency 2.7 GHz N/A UserInputUnit Jz test_get_num_from_scalar_unit_frequency_negative N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A ScalarUnit_Frequency N/A self InputFrequency get_num_from_scalar_unit N/A self UserInputUnit N/A N/A N/A Exception N/A error N/A N/A N/A N/A self assertTrue N/A isinstance error ValueError N/A N/A N/A self assertEqual N/A _ The unit "Jz" is not valid. Valid units are "['GHz', 'Hz', 'MHz', 'kHz']". N/A N/A error __str__ N/A N/A GetNumFromScalarUnitTimeNegative N/A TestCase N/A N/A InputTime 5 ms N/A UserInputUnit D test_get_num_from_scalar_unit_frequency_negative N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A ScalarUnit_Time N/A self InputTime get_num_from_scalar_unit N/A self UserInputUnit N/A N/A N/A Exception N/A error N/A N/A N/A N/A self assertTrue N/A isinstance error ValueError N/A N/A N/A self assertEqual N/A _ "Jz" is not a valid scalar-unit. N/A N/A error __str__ N/A N/A ScalarUnitNegativeTest N/A TestCase N/A N/A custom_def_snippet 
    tosca.my.nodes.Compute:
      derived_from: tosca.nodes.Root
      properties:
        cpu_frequency:
          required: false
          type: scalar-unit.frequency
          constraints:
            - greater_or_equal: 0.1 GHz
        disk_size:
          required: false
          type: scalar-unit.size
          constraints:
            - greater_or_equal: 1 GB
        mem_size:
          required: false
          type: scalar-unit.size
          constraints:
            - in_range: [1 MiB, 1 GiB]
     N/A custom_def N/A N/A yamlparser simple_parse custom_def_snippet test_invalid_scalar_unit N/A N/A self N/A N/A N/A tpl_snippet 
        server:
          type: tosca.my.nodes.Compute
          properties:
            cpu_frequency: 50.3.6 GHZ
            disk_size: MB
            mem_size: 1 QB
         N/A nodetemplates N/A N/A yamlparser simple_parse tpl_snippet N/A nodetemplate N/A NodeTemplate server nodetemplates N/A self custom_def N/A p N/A N/A nodetemplate get_properties_objects N/A N/A N/A N/A self assertRaises ValueError N/A p validate N/A test_constraint_for_scalar_unit N/A N/A self N/A N/A N/A tpl_snippet 
        server:
          type: tosca.my.nodes.Compute
          properties:
            cpu_frequency: 0.05 GHz
            disk_size: 500 MB
            mem_size: 1 MB
         N/A nodetemplates N/A N/A yamlparser simple_parse tpl_snippet N/A nodetemplate N/A NodeTemplate server nodetemplates N/A self custom_def N/A props N/A N/A nodetemplate get_properties N/A N/A cpu_frequency N/A N/A props keys N/A N/A error N/A N/A self assertRaises N/A exception ValidationError N/A N/A props N/A cpu_frequency validate N/A N/A N/A self assertEqual N/A _ The value "0.05 GHz" of property "cpu_frequency" must be greater than or equal to "0.1 GHz". N/A N/A error __str__ N/A N/A disk_size N/A N/A props keys N/A N/A error N/A N/A self assertRaises N/A exception ValidationError N/A N/A props N/A disk_size validate N/A N/A N/A self assertEqual N/A _ The value "500 MB" of property "disk_size" must be greater than or equal to "1 GB". N/A N/A error __str__ N/A N/A mem_size N/A N/A props keys N/A N/A error N/A N/A self assertRaises N/A exception ValidationError N/A N/A props N/A mem_size validate N/A N/A N/A self assertEqual N/A _ The value "1 MB" of property "mem_size" is out of range "(min:1 MiB, max:1 GiB)". N/A N/A error __str__ N/A N/A