def get_service_profile_table_data(self): service_profiles = [] try: service_profiles = client.serviceprofile_list(self.request) except Exception: pass return service_profiles
def __init__(self, request, *args, **kwargs): super(CreateServiceChainNodeForm, self).__init__( request, *args, **kwargs) try: service_profile_tuples = [] service_profile_list = client.serviceprofile_list(self.request) for service_profile in service_profile_list: sp = (service_profile.id, service_profile.name + ' : ' + service_profile.service_type) service_profile_tuples.append(sp) self.fields['service_profile_id'].choices = service_profile_tuples except Exception: msg = _("Failed to retrive Service profile details.") LOG.error(msg)
def __init__(self, request, *args, **kwargs): super(CreateServiceChainNodeForm, self).__init__(request, *args, **kwargs) try: service_profile_tuples = [] service_profile_list = client.serviceprofile_list(self.request) for service_profile in service_profile_list: sp = (service_profile.id, service_profile.name + ' : ' + service_profile.service_type) service_profile_tuples.append(sp) self.fields['service_profile_id'].choices = service_profile_tuples except Exception: msg = _("Failed to retrive Service profile details.") LOG.error(msg)