Merge pull request #18 from pdmars/mgmt_reboot_instance
adding mysql stop and instance reboot commands for management client
This commit is contained in:
		| @@ -138,6 +138,22 @@ class InstanceCommands(object): | |||||||
|         except: |         except: | ||||||
|             print sys.exc_info()[1] |             print sys.exc_info()[1] | ||||||
|  |  | ||||||
|  |     def stop(self, id): | ||||||
|  |         """Stop MySQL on the given instance.""" | ||||||
|  |         dbaas = common.get_client() | ||||||
|  |         try: | ||||||
|  |             result = dbaas.management.stop(id) | ||||||
|  |         except: | ||||||
|  |             print sys.exc_info()[1] | ||||||
|  |  | ||||||
|  |     def reboot(self, id): | ||||||
|  |         """Reboot the instance.""" | ||||||
|  |         dbaas = common.get_client() | ||||||
|  |         try: | ||||||
|  |             result = dbaas.management.reboot(id) | ||||||
|  |         except: | ||||||
|  |             print sys.exec_info()[1] | ||||||
|  |  | ||||||
|  |  | ||||||
| class StorageCommands(object): | class StorageCommands(object): | ||||||
|     """Commands to list devices info""" |     """Commands to list devices info""" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Nirmal Ranganathan
					Nirmal Ranganathan