Exemple #1
0
 def test_create_vnffg_with_mandatory_params(self):
     cmd = vnffg.CreateVNFFG(test_cli10.MyApp(sys.stdout), None)
     my_id = 'my-id'
     vnffg_name = 'fake-vnffg'
     vnffgd_id = 'vnffgd'
     args = [
         vnffg_name,
         '--vnffgd-id',
         vnffgd_id,
     ]
     position_names = ['vnffgd_id']
     position_values = [vnffgd_id]
     extra_body = {
         'symmetrical': False,
         'name': vnffg_name,
         'attributes': {}
     }
     self._test_create_resource(self._RESOURCE,
                                cmd,
                                vnffg_name,
                                my_id,
                                args,
                                position_names,
                                position_values,
                                extra_body=extra_body,
                                get_client_called_count=2)
Exemple #2
0
 def test_create_vnffg_with_mandatory_params(self):
     cmd = vnffg.CreateVNFFG(test_cli10.MyApp(sys.stdout), None)
     my_id = 'my-id'
     vnffg_name = 'fake-vnffg'
     vnffgd_id = 'vnffgd'
     args = [
         vnffg_name,
         '--vnffgd-id', vnffgd_id,
     ]
     position_names = ['vnffgd_id']
     position_values = [vnffgd_id]
     extra_body = {'name': vnffg_name}
     self._test_create_resource(self._RESOURCE, cmd, vnffg_name, my_id,
                                args, position_names, position_values,
                                extra_body=extra_body)
Exemple #3
0
    def test_create_vnffg_all_params(self):
        cmd = vnffg.CreateVNFFG(test_cli10.MyApp(sys.stdout), None)
        my_id = 'my-id'
        vnffgd_id = 'vnffgd'
        vnffg_name = 'fake-vnffg'
        vnf_mapping = 'VNFD1:VNF1'

        args = [
            vnffg_name,
            '--vnffgd-id', vnffgd_id,
            '--vnf-mapping', vnf_mapping,
            '--symmetrical', 'True']
        position_names = ['vnffgd_id', 'vnf_mapping', 'symmetrical']
        position_values = [vnffgd_id, {"VNFD1": "VNF1"}, 'True']
        extra_body = {'name': vnffg_name}
        self._test_create_resource(self._RESOURCE, cmd, None, my_id,
                                   args, position_names, position_values,
                                   extra_body=extra_body)