Skip to content

Add shell commands to the client#1629

Merged
ssalinas merged 4 commits into
masterfrom
shell_commands_client
Oct 12, 2017
Merged

Add shell commands to the client#1629
ssalinas merged 4 commits into
masterfrom
shell_commands_client

Conversation

@ssalinas
Copy link
Copy Markdown
Contributor

also adds endpoints to get more individual shell command data

return post(requestUri, "start shell command", Optional.of(shellCommand), Optional.of(SingularityTaskShellCommandRequest.class)).orNull();
}

public Collection<SingularityTaskShellCommandHistory> getShellCommandHisotry(String taskId) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getShellCommandHisotry -> getShellCommandHistory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! fixed

@ssalinas ssalinas added this to the 0.18.0 milestone Oct 11, 2017
@ssalinas ssalinas added the hs_qa label Oct 11, 2017
public Collection<SingularityTaskShellCommandUpdate> getShellCommandUpdates(SingularityTaskShellCommandRequest shellCommandRequest) {
final Function<String, String> requestUri = (host) -> String.format(SHELL_COMMAND_UPDATES_FORMAT, getApiBase(host), shellCommandRequest.getTaskId(), shellCommandRequest.getShellCommand().getName(), shellCommandRequest.getTimestamp());

return getCollection(requestUri, "get shell command history", SHELL_COMMAND_UPDATES);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe get shell command update history instead just so it's differentiated a bit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getCollection is the generic implementation to get a collection of objects, it's a private method. The public one is already named getShellCommandUpdates

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, you meant the string there, :derp: 👍

@matush-v
Copy link
Copy Markdown
Contributor

🚢 🚢 🚢 ⚓️

baconmania
baconmania previously approved these changes Oct 12, 2017
@matush-v
Copy link
Copy Markdown
Contributor

🚢

@ssalinas ssalinas merged commit 13b8c8e into master Oct 12, 2017
@ssalinas ssalinas deleted the shell_commands_client branch October 12, 2017 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants