9732db18a1
Change-Id: I74fca76e90bca61bc41379096d0f3f0410e07ca5
22 lines
453 B
Python
22 lines
453 B
Python
# flake8: noqa
|
|
import sys
|
|
|
|
import grpc
|
|
|
|
from oaktreemodel import model
|
|
from oaktreemodel import oaktree_pb2
|
|
|
|
channel = grpc.insecure_channel('localhost:50051')
|
|
stub = oaktree_pb2.OaktreeStub(channel)
|
|
|
|
cloud = model.Location()
|
|
if len(sys.argv) > 1:
|
|
cloud.cloud = sys.argv[1]
|
|
else:
|
|
cloud.cloud = 'devstack'
|
|
|
|
flavors = stub.ListFlavors(model.Filter(location=cloud))
|
|
print flavors
|
|
images = stub.ListImages(model.Filter(location=cloud))
|
|
print images
|