Commit 9b27ef8b authored by Daniele Venzano's avatar Daniele Venzano

Remove the "requires_binary" field

parent f16c6073
{
"name": "aml-lab",
"priority": 512,
"requires_binary": false,
"services": [
{
"docker_image": "docker-registry:5000/zapps/spark2-master",
......
......@@ -49,13 +49,6 @@ optional, boolean
If set to true, disables all kinds of auorestart on all services of this ZApp.
requires_binary
^^^^^^^^^^^^^^^
required, boolean
For now this value is unused.
services
^^^^^^^^
......@@ -219,7 +212,6 @@ Example
"version": 2,
"will_end": false,
"priority": 512,
"requires_binary": false,
"services": [
{
"name": "jupyter",
......
{
"name": "nginx",
"priority": 512,
"requires_binary": true,
"name": "nginx",
"priority": 512,
"services": [
{
"docker_image": "nginx:alpine",
"docker_image": "nginx:alpine",
"environment": [],
"essential_count": 1,
"monitor": true,
"essential_count": 1,
"monitor": true,
"name": "nginx",
"networks": [],
"ports": [
{
"expose": false,
"is_main_endpoint": true,
"is_main_endpoint": true,
"name": "Nginx Webserver",
"path": "/",
"port_number": 80,
"path": "/",
"port_number": 80,
"protocol": "http"
}
],
],
"required_resources": {
"memory": 536870912
},
"startup_order": 0,
},
"startup_order": 0,
"total_count": 1
}
],
"version": 2,
],
"version": 2,
"will_end": false
}
......@@ -46,10 +46,6 @@ export class ServiceDescription implements Serializable<ServiceDescription> {
this.version = input.version;
}
if (input.hasOwnProperty('requires_binary')) {
this.requiresBinary = input.requires_binary;
}
if (input.hasOwnProperty('required_resources')) {
this.requiredResources = new Resource().deserialize(input.required_resources);
}
......
......@@ -35,7 +35,7 @@ def app_validate(data):
:param data: a dictionary containing an application description
:return: None if the application description is correct
"""
required_keys = ['name', 'will_end', 'priority', 'requires_binary', 'version']
required_keys = ['name', 'will_end', 'priority', 'version']
for k in required_keys:
if k not in data:
raise InvalidApplicationDescription(msg="Missing required key: %s" % k)
......@@ -52,11 +52,6 @@ def app_validate(data):
except ValueError:
raise InvalidApplicationDescription(msg="will_end field must be a boolean")
try:
bool(data['requires_binary'])
except ValueError:
raise InvalidApplicationDescription(msg="requires_binary field must be a boolean")
try:
priority = int(data['priority'])
except ValueError:
......
......@@ -36,7 +36,6 @@ class TestApplicationsMethods(unittest.TestCase):
"name": "test name",
"will_end": True,
"priority": 3,
"requires_binary": False,
"version": current_version,
"services": []
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment