def take_action(self, parsed_args): attrs = v2_utils.get_availabilityzone_attrs(self.app.client_manager, parsed_args) availabilityzone_name = attrs.pop('availabilityzone_name') self.app.client_manager.load_balancer.availabilityzone_delete( availabilityzone_name=availabilityzone_name)
def take_action(self, parsed_args): attrs = v2_utils.get_availabilityzone_attrs(self.app.client_manager, parsed_args) availabilityzone_name = attrs.pop('availabilityzone_name') body = {'availability_zone': attrs} self.app.client_manager.load_balancer.availabilityzone_set( availabilityzone_name, json=body)
def take_action(self, parsed_args): columns = const.AVAILABILITYZONE_COLUMNS attrs = v2_utils.get_availabilityzone_attrs(self.app.client_manager, parsed_args) data = self.app.client_manager.load_balancer.availabilityzone_list( **attrs) formatters = {'availabilityzoneprofiles': v2_utils.format_list} return (columns, (utils.get_dict_properties(s, columns, formatters=formatters) for s in data['availability_zones']))
def take_action(self, parsed_args): rows = const.AVAILABILITYZONE_ROWS attrs = v2_utils.get_availabilityzone_attrs(self.app.client_manager, parsed_args) body = {"availability_zone": attrs} data = self.app.client_manager.load_balancer.availabilityzone_create( json=body) formatters = {'availability_zone_profiles': v2_utils.format_list} return (rows, (utils.get_dict_properties( data['availability_zone'], rows, formatters=formatters)))
def take_action(self, parsed_args): rows = const.AVAILABILITYZONE_ROWS attrs = v2_utils.get_availabilityzone_attrs(self.app.client_manager, parsed_args) availabilityzone_name = attrs.pop('availabilityzone_name') data = self.app.client_manager.load_balancer.availabilityzone_show( availabilityzone_name=availabilityzone_name ) formatters = {'availabilityzoneprofiles': v2_utils.format_list} return (rows, (utils.get_dict_properties( data, rows, formatters=formatters)))