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
clone_vm/clone_server takes reference as first parameter #50
Conversation
Server#clone called clone_vm with wrong parameter order causing subsequent API call failure.
@@ -154,7 +154,7 @@ def can_be_cloned? | |||
|
|||
def clone(name) | |||
raise "Clone Operation not Allowed" unless can_be_cloned? | |||
self.reference = service.clone_vm(name, self.reference) | |||
self.reference = service.clone_vm(self.reference, name) |
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.
Redundant self
detected.
Damm. Good catch. Can you take care of the few style warnings? Thank you! PS: what are your feedback on |
Yep, can check style warnings. For a while I fight with VM creation from template, but I found correct approach in git log. Than I run into problems with following code:
Where vm.start failed due to missing disk (as Issue I'm fight right now is that after vm.start I don't have access to All my issues seems to be related to lack of documentation. |
Hmmm. Thank you for the feedback. We have some documentation in the wiki but most are not updated. Gotta fix them. The point with This new design follows the `XENAPI´ one. A good look at here should help you a lot. =) |
Thx @djaara ! |
clone_vm/clone_server takes reference as first parameter
Release as |
Great! Thanks. One more thing - is there any alternative to original def refresh
Fog::Logger.deprecation(
'This method is deprecated. Use #reload instead.'
)
data = service.get_record( reference, 'VM' )
merge_attributes( data )
true
end At this moment, I've replaced vm = connection.servers.get vm.reference But there might be better solution. |
Yeah, there is |
I forgot to mention, that With |
Hmm. i suspect it might be a bug somewhere when instantiating the objects. I suspect it might be related to the associations stuff and the EDIT: Perhaps the identity is not being overwrited with the new value and thus |
Server#clone called clone_vm with wrong parameter order causing
subsequent API call failure.