示例#1
0
    def take_action(self, parsed_args):
        client = get_client(parsed_args)

        marker = parsed_args.marker if parsed_args.marker else None
        kwargs = {'ex_next_marker': marker}

        entities = [Entity(entity)
                    for entity in client.list_entities(**kwargs)]
        collection = Collection(entities)
        return collection.generate_output()
示例#2
0
    def take_action(self, parsed_args):
        client = get_client(parsed_args)

        marker = parsed_args.marker if parsed_args.marker else None
        entity = Placeholder(parsed_args.entity_id)
        kwargs = {'ex_next_marker': marker}

        checks = [Check(check)
                  for check in client.list_checks(entity, **kwargs)]
        collection = Collection(checks)
        return collection.generate_output()
示例#3
0
    def take_action(self, parsed_args):
        client = get_client(parsed_args)

        marker = parsed_args.marker if parsed_args.marker else None
        kwargs = {'ex_next_marker': marker}

        entity = Placeholder(parsed_args.entity_id)
        alarms = [Alarm(alarm)
                  for alarm in client.list_alarms(entity,
                                                  **kwargs)]
        collection = Collection(alarms)
        return collection.generate_output()
示例#4
0
    def take_action(self, parsed_args):
        client = get_client(parsed_args)

        agent_tokens = [AgentToken(agent_token) for agent_token in client.list_agent_tokens()]
        collection = Collection(agent_tokens)
        return collection.generate_output()
示例#5
0
 def take_action(self, parsed_args):
     client = get_client(parsed_args)
     entity = Entity(client.get_entity(parsed_args.entity_id))
     return entity.generate_output()
示例#6
0
 def take_action(self, parsed_args):
     client = get_client(parsed_args)
     alarm = Alarm(client.get_alarm(parsed_args.entity_id,
                                    parsed_args.alarm_id))
     return alarm.generate_output()
示例#7
0
 def take_action(self, parsed_args):
     client = get_client(parsed_args)
     agent_token = AgentToken(
         client.get_agent_token(parsed_args.agent_token_id))
     return agent_token.generate_output()
示例#8
0
 def take_action(self, parsed_args):
     client = get_client(parsed_args)
     check = Check(client.get_check(parsed_args.entity_id, parsed_args.check_id))
     return check.generate_output()