def test_group_command_status_get():
    api_instance = esperclient.GroupCommandsApi(
        esperclient.ApiClient(configuration))
    command_id = '381bbcc0-078e-407a-ac3a-f4bc4895023d'  # replace with valid uuid
    group_id = '7b3963ce-61f5-474b-8fc7-7f9fcf2aa1cc'  # replace with valid uuid

    try:
        api_response = api_instance.get_group_command(command_id, group_id,
                                                      enterprise_id)
        print(api_response)
    except ApiException as e:
        print(
            "Exception when calling GroupCommandsApi->get_group_command: %s\n"
            % e)

    assert api_response.id is not None, "Id cannot be None"
def test_group_command_reboot():
    api_instance = esperclient.GroupCommandsApi(
        esperclient.ApiClient(configuration))
    group_id = '7b3963ce-61f5-474b-8fc7-7f9fcf2aa1cc'  # replace with valid uuid
    command_args = esperclient.GroupCommandArgs()
    data = esperclient.GroupCommandRequest(command='REBOOT',
                                           command_args=command_args)

    try:
        api_response = api_instance.run_group_command(enterprise_id, group_id,
                                                      data)
        print(api_response)
    except ApiException as e:
        print(
            "Exception when calling GroupCommandsApi->run_group_command: %s\n"
            % e)

    assert api_response.id is not None, "Id cannot be None"
    assert api_response.state == 'Command Initiated', "Command could not be initiated"
Example #3
0
 def get_group_command_api_client(self):
     return client.GroupCommandsApi(client.ApiClient(self.config))