oaktree/devstack/test.py
Monty Taylor 9732db18a1
Rename Search to List
Change-Id: I74fca76e90bca61bc41379096d0f3f0410e07ca5
2016-11-14 06:31:21 -06:00

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