Fix marathon framework autodetection
TrivialFix Change-Id: I3f0406e6a634350a6dca2675037978b2bff73379
This commit is contained in:
parent
75e2038a5a
commit
18c9de1bc7
|
@ -62,9 +62,9 @@ def get_number_of_nodes(mesos_client):
|
||||||
def get_marathon(mesos_client):
|
def get_marathon(mesos_client):
|
||||||
frameworks = mesos_client.get_frameworks()
|
frameworks = mesos_client.get_frameworks()
|
||||||
frameworks_names = map(operator.itemgetter('name'), frameworks)
|
frameworks_names = map(operator.itemgetter('name'), frameworks)
|
||||||
|
marathon_framework = None
|
||||||
for framework_name in frameworks_names:
|
for framework_name in frameworks_names:
|
||||||
if "marathon" in framework_name:
|
if "marathon" in framework_name:
|
||||||
marathon_framework = framework_name
|
marathon_framework = framework_name
|
||||||
else:
|
break
|
||||||
marathon_framework = None
|
|
||||||
return marathon_framework
|
return marathon_framework
|
||||||
|
|
|
@ -38,7 +38,8 @@ MESOS_STATE_TAGGED_SLAVES = {
|
||||||
],
|
],
|
||||||
'frameworks': [
|
'frameworks': [
|
||||||
{'name': 'chronos_autodetect'},
|
{'name': 'chronos_autodetect'},
|
||||||
{'name': 'marathon_autodetect'}
|
{'name': 'marathon_autodetect'},
|
||||||
|
{'name': 'another_framework'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
MESOS_STATE_UNTAGGED_SLAVES = {
|
MESOS_STATE_UNTAGGED_SLAVES = {
|
||||||
|
@ -55,7 +56,8 @@ MESOS_STATE_NO_SLAVES = {
|
||||||
MESOS_STATE_FRAMEWORKS = {
|
MESOS_STATE_FRAMEWORKS = {
|
||||||
'frameworks': [
|
'frameworks': [
|
||||||
{'name': 'chronos_autodetect'},
|
{'name': 'chronos_autodetect'},
|
||||||
{'name': 'marathon_autodetect'}
|
{'name': 'marathon_autodetect'},
|
||||||
|
{'name': 'another_framework'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue