Open helioloureiro opened 1 week ago
I got what I did wrong. I forced to create, even if created, and that worked.
def destroyServer(self):
self.manager.create_server(self.server)
self.server.stop_and_destroy()
for disk in self.server.storage_devices:
disk.destroy()
Ok... that wasn ´t a good idea. I ended up creating an extra server every time I tried to destroy the other.
So problem remains.
The creation of the Server
object on the server = Server(
-line manually seems to create the problem. It seems that the same object is later used in destroyServer()
. The Server() objects should really be only sent to the create_server()
method provided by the SDK.
Here are a couple of ideas that came to my mind to try and fix this:
self.manager.create_server(self.server)
to self.server = self.manager.create_server(self.server)
create_server()
method returns a Server
-object with the cloud_manager
correctly populatedget_server(uuid)
method provided by the SDKself.server = Server._create_server_obj(Server(...your fields here...), cloud_manager=self.manager)
to create the Server objectServer()
-object after the server = Server(
-call like so: server.cloud_manager = self.manager
or server['cloud_manager'] = self.manager
Hope this helps!
Hi,
I've tried to apply what is describe on the project page to have a server up and running.
My Server builder is like this:
and it works to create the server.
but it is crashing during shutdown and destroy. The code is this below:
And I get the following error:
So I'm not sure whether I did something wrong, but it complains about this missing attribute.