Ejemplo n.º 1
0
1. When should get_container_state return "Suspended"
2. note incompatible IPAddress -> IpAddress
3. note Name field has no leading '/' character as in docker

Extensions to current CCSAPI: Talk to Dave ???

GET   /{version}/containers/new (launch wizard screen for containers and groups)
"""

APP_NAME=os.environ['APP_NAME'] if 'APP_NAME' in os.environ else 'ccs'
GROUP_STORE=FileGroupStore(False)
BINDING_STORE=FileBindingStore(False)
# Only reset the GROUP_STORE if we determine it is out of sync with the current docker instances
for group in GROUP_STORE.list_groups():
    if len(get_group_instances(group)) < group.get("NumberInstances", {}).get("Min", 0):
        GROUP_STORE.reset()
        break

HTML_TEMPLATE=\
'''
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>IBM CCS Emulator</title>
</head>
<body>
    <div id="spa" style="display:none">
        <span id="ace_config">
            $ace_config
        </span>