Merge "Fix marathon framework autodetection"

This commit is contained in:
Jenkins 2016-03-31 14:40:33 +00:00 committed by Gerrit Code Review
commit 0d1eb79009
2 changed files with 6 additions and 4 deletions

View File

@ -62,9 +62,9 @@ def get_number_of_nodes(mesos_client):
def get_marathon(mesos_client):
frameworks = mesos_client.get_frameworks()
frameworks_names = map(operator.itemgetter('name'), frameworks)
marathon_framework = None
for framework_name in frameworks_names:
if "marathon" in framework_name:
marathon_framework = framework_name
else:
marathon_framework = None
break
return marathon_framework

View File

@ -38,7 +38,8 @@ MESOS_STATE_TAGGED_SLAVES = {
],
'frameworks': [
{'name': 'chronos_autodetect'},
{'name': 'marathon_autodetect'}
{'name': 'marathon_autodetect'},
{'name': 'another_framework'}
]
}
MESOS_STATE_UNTAGGED_SLAVES = {
@ -55,7 +56,8 @@ MESOS_STATE_NO_SLAVES = {
MESOS_STATE_FRAMEWORKS = {
'frameworks': [
{'name': 'chronos_autodetect'},
{'name': 'marathon_autodetect'}
{'name': 'marathon_autodetect'},
{'name': 'another_framework'}
]
}