예제 #1
0
def create(name, imageId, flavorId, metadata={}, personality=[]):
    mosso = get_server_api()
    response = mosso.servers.POST(
        name=name,
        imageId=int(imageId),
        flavorId=int(flavorId),
        metadata=metadata,
        personality=personality
    )

    result = {"servers": [response['server'], ]}
    detail_output(result=result, title="New Server", key='server')
예제 #2
0
def detail(id=None):
    detail_output(path='images', id=id, title="Images", key='image')
예제 #3
0
def detail(id=None):
    detail_output(path='flavors', id=id, title="Flavors", key='flavor')
예제 #4
0
def detail(id=None):
    detail_output(path='servers', id=id, title='Servers', key='server')