def add_vnf_locator_name(self, sub_ns_nid, vnf_nid, desc, loc_n): try: if loc_n not in VNF_LOC_NAME_SET: raise Exception('unknown vnf locator name: %s' % loc_n) except Exception, e: print Exception, ':', e, \ ' in %s:%s' % get_class_func_name(self)
def add_serv_exposure_policy(self, sep_id, subns, p_id): try: if subns not in self.model['SubNsFlavors']: raise Exception('unknown sub ns node id: %s' % subns) except Exception, e: print Exception, ':', e, \ ' in %s:%s' % get_class_func_name(self)
def add_sla_flavor(self, sla_id, val, desc, val_t='num'): try: if val_t not in SLA_VALUE_TYPE_SET: raise Exception('unknown sla value type: %s' % val_t) except Exception, e: print Exception, ':', e, \ ' in %s:%s' % get_class_func_name(self)
def add_location_refer_point(self, ep_id, loc_desc): try: if ep_id not in self.model['EndPoints']: raise Exception('unknown endpoint id: %s' % ep_id) except Exception, e: print Exception, ':', e, \ ' in %s:%s' % get_class_func_name(self)
def add_vnf_location(self, sub_ns_nid, vnf_nid, loc_desc): try: if sub_ns_nid not in self.model['SubNsFlavors']: raise Exception('unknown sub ns node id: %s' % sub_ns_nid) except Exception, e: print Exception, ':', e, \ ' in %s:%s' % get_class_func_name(self)
def set_vnf_relationship_info(self, type_id, desc, style='connectTo', ver='1.0.0', vendor='iaa'): self.model['Info']['vnfRelationshipTypeId'] = type_id try: if style not in RELATION_STYLE_SET: raise Exception('unknown relationship type: %s' % style) except Exception, e: print Exception, ':', e, \ ' in %s:%s' % get_class_func_name(self)