summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Simpson <tim.simpson@rackspace.com>2012-09-27 13:07:44 -0700
committerTim Simpson <tim.simpson@rackspace.com>2012-09-27 13:07:44 -0700
commit498a03cb037d55f961887b2c4d0a0f6b53a4d75b (patch)
tree3ddb13f50ecc4b92d5aab752d61d23a624c4dc7c
parent3c2a9544c2981db40198e3dee84fc5cdbb611350 (diff)
parent79fa1fbd148ce614eed70784b7dc6d5e4638617f (diff)
downloadpython-troveclient-498a03cb037d55f961887b2c4d0a0f6b53a4d75b.tar.gz
Merge pull request #38 from sacharya/mgmt-migrate
Updaing the client for mgmt api migrate instance call.
-rw-r--r--reddwarfclient/management.py9
-rw-r--r--reddwarfclient/mcli.py5
2 files changed, 14 insertions, 0 deletions
diff --git a/reddwarfclient/management.py b/reddwarfclient/management.py
index 027fb88..0c824d0 100644
--- a/reddwarfclient/management.py
+++ b/reddwarfclient/management.py
@@ -109,6 +109,15 @@ class Management(base.ManagerWithFind):
body = {'reboot': {}}
self._action(instance_id, body)
+ def migrate(self, instance_id):
+ """
+ Migrate the instance.
+
+ :param instance_id: The :class:`Instance` (or its ID) to share onto.
+ """
+ body = {'migrate': {}}
+ self._action(instance_id, body)
+
def update(self, instance_id):
"""
Update the guest agent via apt-get.
diff --git a/reddwarfclient/mcli.py b/reddwarfclient/mcli.py
index 1de421a..37c2821 100644
--- a/reddwarfclient/mcli.py
+++ b/reddwarfclient/mcli.py
@@ -141,6 +141,11 @@ class InstanceCommands(common.AuthedCommandsBase):
self._require('id')
self._pretty_print(self.dbaas.management.reboot, self.id)
+ def migrate(self):
+ """Migrate the instance."""
+ self._require('id')
+ self._pretty_print(self.dbaas.management.migrate, self.id)
+
class StorageCommands(common.AuthedCommandsBase):
"""Commands to list devices info"""