def validate_with_client(self, client, value): senlin_client = client.client(CLIENT_NAME) type_list = senlin_client.policy_types() names = [pt['name'] for pt in type_list] if value not in names: not_found_message = ( _("Unable to find senlin policy type '%(pt)s', " "available policy types are %(pts)s.") % {'pt': value, 'pts': names} ) raise exception.StackValidationFailed(message=not_found_message)
def validate_with_client(self, client, value): senlin_client = client.client(CLIENT_NAME) type_list = senlin_client.profile_types() names = [pt.name for pt in type_list] if value not in names: not_found_message = ( _("Unable to find senlin profile type '%(pt)s', " "available profile types are %(pts)s.") % {'pt': value, 'pts': names} ) raise exception.StackValidationFailed(message=not_found_message)
def validate_with_client(self, client, value): client.client(CLIENT_NAME).get_cluster(value)
def validate_with_client(self, client, profile): client.client(CLIENT_NAME).get_profile(profile)
def validate_with_client(self, client, profile): params = {'id': profile} client.client('senlin').get(models.Profile, params)
def validate_with_client(self, client, value): client.client(CLIENT_NAME).get_policy(value)
def validate_with_client(self, client, profile): client.client('senlin').get_profile(profile)
def validate_with_client(self, client, profile): params = { 'id': profile } client.client('senlin').get(models.Profile, params)