Skip to content

Instantly share code, notes, and snippets.

@tfukushima
Last active October 7, 2015 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfukushima/1ed9cf30f3889464cade to your computer and use it in GitHub Desktop.
Save tfukushima/1ed9cf30f3889464cade to your computer and use it in GitHub Desktop.
A patch for the failure on creating an endpoint
diff --git kuryr/controllers.py kuryr/controllers.py
index 927f66d..26ef490 100644
--- kuryr/controllers.py
+++ kuryr/controllers.py
@@ -422,7 +422,7 @@ def network_driver_create_endpoint():
})
else:
neutron_network_id = filtered_networks[0]['id']
- interface = json_data['Interface']
+ interface = json_data['Interface'] or {}
response_interface = _create_subnets_and_or_port(
interface, neutron_network_id, endpoint_id)
diff --git kuryr/schemata/commons.py kuryr/schemata/commons.py
index 487b05d..a24319d 100644
--- kuryr/schemata/commons.py
+++ kuryr/schemata/commons.py
@@ -76,7 +76,7 @@ COMMONS = {
u'$ref': u'#/definitions/commons/definitions/cidr'
}
},
- u'type': u'object',
+ u'type': [u'object', u'null'],
u'description': u'Interface used in requests against Endpoints.',
u'example': {
u'AddressIPv6': u'fe80::f816:3eff:fe20:57c3/64',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment