Openstack nova API live migrate AttributeError: _action python 2.7
I am trying live migrate a server via the openstack python sdk.
from keystoneauth1.identity import v3
from keystoneauth1 import session
import json, ast
auth = v3.Password(auth_url='',
username='',
password='',
project_name='',
user_domain_id='',
project_domain_id='')
sess = session.Session(auth=auth)
print(sess)
from novaclient import client
nova = client.Client('2.30', session=sess)
servers = nova.servers.list()
for s in servers:
print(s)
# print(dir(s))
s.live_migrate(host="oscnode1.localhost",block_migration=False,server=None)
Here is the error message I am getting
<Server: api_test_ubuntu2>
Traceback (most recent call last):
File "C:/Users/a/PycharmProjects/openstack_api/openstack_sdk_v3.py", line 129, in <module>
s.live_migrate(host="oscnode1.localhost",block_migration=False,server=None)
File "C:\Python27\lib\site-packages\novaclient\api_versions.py", line 402, in substitution
return methods[-1].func(obj, *args, **kwargs)
File "C:\Python27\lib\site-packages\novaclient\v2\servers.py", line 1675, in live_migrate
return self._action('os-migrateLive', server, body)
File "C:\Python27\lib\site-packages\novaclient\base.py", line 180, in __getattr__
raise AttributeError(k)
AttributeError: _action
I am able to connect and run other command to the nova api like nova.servers.list() and others.
I am using Python 2.7.12 on windows and python-openstackclient with python-novaclient both at the lastest versions.
Thanks for your help