def take_action(self, parsed_args):
     archive_policy = utils.dict_from_parsed_args(
         parsed_args, ['name', 'back_window', 'aggregation_methods',
                       'definition'])
     ap = self.app.client.archive_policy.create(
         archive_policy=archive_policy)
     utils.format_archive_policy(ap)
     return self.dict2columns(ap)
Пример #2
0
 def take_action(self, parsed_args):
     archive_policy = utils.dict_from_parsed_args(parsed_args,
                                                  ['definition'])
     ap = utils.get_client(self).archive_policy.update(
         name=parsed_args.name, archive_policy=archive_policy)
     if parsed_args.formatter == 'table':
         utils.format_archive_policy(ap)
     return self.dict2columns(ap)
 def take_action(self, parsed_args):
     archive_policy = utils.dict_from_parsed_args(
         parsed_args,
         ['name', 'back_window', 'aggregation_methods', 'definition'])
     ap = self.app.client.archive_policy.create(
         archive_policy=archive_policy)
     utils.format_archive_policy(ap)
     return self.dict2columns(ap)
 def take_action(self, parsed_args):
     archive_policy = utils.dict_from_parsed_args(
         parsed_args, ['definition'])
     ap = self.app.client.archive_policy.update(
         name=parsed_args.name, archive_policy=archive_policy)
     if parsed_args.formatter == 'table':
         utils.format_archive_policy(ap)
     return self.dict2columns(ap)
Пример #5
0
 def take_action(self, parsed_args):
     archive_policy = utils.dict_from_parsed_args(
         parsed_args,
         ['name', 'back_window', 'aggregation_methods', 'definition'])
     ap = utils.get_client(self).archive_policy.create(
         archive_policy=archive_policy)
     if parsed_args.formatter == 'table':
         utils.format_archive_policy(ap)
     return self.dict2columns(ap)
 def take_action(self, parsed_args):
     archive_policy = utils.dict_from_parsed_args(
         parsed_args, ['name', 'back_window', 'aggregation_methods',
                       'definition'])
     ap = utils.get_client(self).archive_policy.create(
         archive_policy=archive_policy)
     if parsed_args.formatter == 'table':
         utils.format_archive_policy(ap)
     return self.dict2columns(ap)
Пример #7
0
 def take_action(self, parsed_args):
     metric = utils.dict_from_parsed_args(parsed_args,
                                          ["archive_policy_name",
                                           "resource_id"])
     return self._take_action(metric, parsed_args)
 def take_action(self, parsed_args):
     rule = utils.dict_from_parsed_args(
         parsed_args, ["name", "metric_pattern", "archive_policy_name"])
     policy = utils.get_client(self).archive_policy_rule.create(rule)
     return self.dict2columns(policy)
Пример #9
0
 def take_action(self, parsed_args):
     metric = utils.dict_from_parsed_args(
         parsed_args, ["archive_policy_name", "resource_id"])
     return self._take_action(metric, parsed_args)