Everything validates now

This commit is contained in:
Jedrzej Nowak 2015-09-30 10:08:26 +02:00
parent 674b11a72a
commit dcd1ea23d8
4 changed files with 15 additions and 8 deletions

View File

@ -17,10 +17,10 @@ input:
schema: str!
value: solard
location_id:
schema: str!
schema: str
value:
reverse: True
is_own: False
transports_id:
schema: str!
value: False
schema: str
is_emit: False

View File

@ -13,10 +13,11 @@ input:
schema: str!
value: ssh
location_id:
schema: str!
schema: str
value:
reverse: True
is_own: False
transports_id:
schema: str!
value: False
schema: str
value:
is_emit: False

View File

@ -8,6 +8,6 @@ input:
value: $uuid
reverse: True
location_id:
schema: str!
schema: str
value:
reverse: True

View File

@ -87,10 +87,16 @@ def location_and_transports(emitter, receiver, orig_mapping):
emitter.name,
single)
return
if emitter_single.get('value') is False:
if emitter_single.get('is_emit') is False:
# this case is when we connect resource to transport itself
# like adding ssh_transport for solard_transport and we don't want then
# transports_id to be messed
# it forbids passing this value around
log.debug("Disabled %r mapping for %r", single, emitter.name)
return
if receiver_single.get('is_own') is False:
# this case is when we connect resource which has location_id but that is
# from another resource
log.debug("Not is_own %r for %r ", single, emitter.name)
return
# connect in other direction