import logging
import uuid
+from lcm.pub.config.config import REPORT_TO_AAI
from lcm.pub.database.models import NSDModel, NSInstModel
from lcm.pub.exceptions import NSLCMException
from lcm.pub.msapi.aai import create_customer_aai
self.check_nsd_valid()
self.check_ns_inst_name_exist()
self.create_ns_inst()
- self.create_ns_in_aai()
+ if REPORT_TO_AAI:
+ self.create_ns_in_aai()
logger.debug("CreateNSService::do_biz::ns_inst_id=%s" % self.ns_inst_id)
return self.ns_inst_id
}
resp_data, resp_status = create_customer_aai(global_customer_id, data)
if resp_data:
- logger.debug("Fail to create ns instance[%s] to aai, resp_status: [%s]." % (self.ns_inst_id, resp_status) )
+ logger.debug("Fail to create ns[%s] to aai: [%s].", self.ns_inst_id, resp_status)
else:
- logger.debug("Success to create ns instance[%s] to aai, resp_status: [%s]." % (self.ns_inst_id, resp_status) )
+ logger.debug("Success to create ns[%s] to aai: [%s].", self.ns_inst_id, resp_status)