Beispiel #1
0
def _vnf_package_vnfd_create(context, values):
    vnf_package_vnfd = models.VnfPackageVnfd()

    vnf_package_vnfd.update(values)
    try:
        vnf_package_vnfd.save(context.session)
    except db_exc.DBDuplicateEntry as e:
        if 'vnfd_id' in e.columns:
            raise exceptions.VnfPackageVnfdIdDuplicate(
                vnfd_id=values.get('vnfd_id'))

    return vnf_package_vnfd
Beispiel #2
0
def return_vnf_package_vnfd():
    model_obj = models.VnfPackageVnfd()
    model_obj.update(fake_vnf_package_vnfd_model_dict())
    return model_obj