-
Notifications
You must be signed in to change notification settings - Fork 930
Issue LIBCLOUD-471: Add Get Console Output #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue LIBCLOUD-471: Add Get Console Output #209
Conversation
|
||
response = self.connection.request(self.path, params=params).object | ||
|
||
return {'instance_id': findattr(element=response, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, you already need to have the instance id to retrieve the output (node.id
) so I'm not sure how value does it add to return a dict
here.
Unless timestamp
is really crucial, I would prefer the method to directly return the console output (str
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have a hard time arguing that it's crucial :). I actually just thought it would be a nicety to have available if someone wanted it. If you want me to make that change I certainly can do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking about it some more, I actually think it would be useful to have access to timestamp
here, so you should leave it as it is.
One use case I had in mind is determining if node is "stuck". If you have access to timestamp
it makes it easier to do that. You can just periodically call this function and check if timestamp
attribute has changed.
To make it more clear and useful, you should do two things:
- Update the docstring and document which keys the return
dict
will always contain - Parse the timestamp and return a
datetime
object (libcloud.utils.iso8601.parse_date
should do the trick)
Updated the test accordingly
Good to go! |
I've made two changes and merged patch into trunk:
|
Great, thanks! |
No description provided.