Change-Id: Ic90eccf067ecb3f268a0b8f7a55548e2956aed0f
Issue-Id: GVNFM-50
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
# limitations under the License.
import logging
# limitations under the License.
import logging
-from lcm.pub.database.models import NfInstModel
+from lcm.pub.database.models import NfInstModel, NfvoRegInfoModel
from lcm.pub.exceptions import NFLCMException
logger = logging.getLogger(__name__)
from lcm.pub.exceptions import NFLCMException
logger = logging.getLogger(__name__)
if not vnf_insts.exists():
logger.warn('VnfInst(%s) does not exist' % self.nf_inst_id)
return
if not vnf_insts.exists():
logger.warn('VnfInst(%s) does not exist' % self.nf_inst_id)
return
+ #sel_vnf = vnf_insts[0]
#if sel_vnf.status != 'NOT_INSTANTIATED':
# raise NFLCMException("Don't allow to delete vnf(status:[%s])" % sel_vnf.status)
NfInstModel.objects.filter(nfinstid=self.nf_inst_id).delete()
#if sel_vnf.status != 'NOT_INSTANTIATED':
# raise NFLCMException("Don't allow to delete vnf(status:[%s])" % sel_vnf.status)
NfInstModel.objects.filter(nfinstid=self.nf_inst_id).delete()