예제 #1
0
def list_datastores(ctx):
    try:
        restore_session(ctx)
        platform = Platform(ctx.obj['client'])
        result = platform.list_datastores()
        stdout(result, ctx)
    except Exception as e:
        stderr(e, ctx)
예제 #2
0
 def test_0015_list_datastores(self):
     """List all datastores
     Invokes the list_datastores of the platform.
     """
     platform = Platform(client=TestDatastore._client)
     datastore_list = platform.list_datastores()
     # Verify
     self.assertTrue(len(datastore_list) > 0)