Merge "Allow network modifications if cluster is not locked"
This commit is contained in:
commit
b9060fe14f
|
@ -1324,11 +1324,7 @@ class Cluster(NailgunObject):
|
||||||
|
|
||||||
The result depends on the current status of cluster.
|
The result depends on the current status of cluster.
|
||||||
"""
|
"""
|
||||||
allowed = [consts.CLUSTER_STATUSES.new,
|
return instance.is_locked
|
||||||
consts.CLUSTER_STATUSES.stopped,
|
|
||||||
consts.CLUSTER_STATUSES.operational,
|
|
||||||
consts.CLUSTER_STATUSES.error]
|
|
||||||
return instance.status not in allowed
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def is_component_enabled(cls, instance, component):
|
def is_component_enabled(cls, instance, component):
|
||||||
|
|
|
@ -166,7 +166,8 @@ class TestHandlers(BaseIntegrationTest):
|
||||||
allowed = [consts.CLUSTER_STATUSES.new,
|
allowed = [consts.CLUSTER_STATUSES.new,
|
||||||
consts.CLUSTER_STATUSES.stopped,
|
consts.CLUSTER_STATUSES.stopped,
|
||||||
consts.CLUSTER_STATUSES.operational,
|
consts.CLUSTER_STATUSES.operational,
|
||||||
consts.CLUSTER_STATUSES.error]
|
consts.CLUSTER_STATUSES.error,
|
||||||
|
consts.CLUSTER_STATUSES.partially_deployed]
|
||||||
for status in consts.CLUSTER_STATUSES:
|
for status in consts.CLUSTER_STATUSES:
|
||||||
cluster.status = status
|
cluster.status = status
|
||||||
# need commit because rollback is called when handler exits with
|
# need commit because rollback is called when handler exits with
|
||||||
|
|
|
@ -1204,7 +1204,8 @@ class TestClusterObject(BaseTestCase):
|
||||||
allowed = [consts.CLUSTER_STATUSES.new,
|
allowed = [consts.CLUSTER_STATUSES.new,
|
||||||
consts.CLUSTER_STATUSES.stopped,
|
consts.CLUSTER_STATUSES.stopped,
|
||||||
consts.CLUSTER_STATUSES.operational,
|
consts.CLUSTER_STATUSES.operational,
|
||||||
consts.CLUSTER_STATUSES.error]
|
consts.CLUSTER_STATUSES.error,
|
||||||
|
consts.CLUSTER_STATUSES.partially_deployed]
|
||||||
for status in consts.CLUSTER_STATUSES:
|
for status in consts.CLUSTER_STATUSES:
|
||||||
self.env.clusters[0].status = status
|
self.env.clusters[0].status = status
|
||||||
self.db.flush()
|
self.db.flush()
|
||||||
|
|
Loading…
Reference in New Issue