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.
|
||||
"""
|
||||
allowed = [consts.CLUSTER_STATUSES.new,
|
||||
consts.CLUSTER_STATUSES.stopped,
|
||||
consts.CLUSTER_STATUSES.operational,
|
||||
consts.CLUSTER_STATUSES.error]
|
||||
return instance.status not in allowed
|
||||
return instance.is_locked
|
||||
|
||||
@classmethod
|
||||
def is_component_enabled(cls, instance, component):
|
||||
|
|
|
@ -166,7 +166,8 @@ class TestHandlers(BaseIntegrationTest):
|
|||
allowed = [consts.CLUSTER_STATUSES.new,
|
||||
consts.CLUSTER_STATUSES.stopped,
|
||||
consts.CLUSTER_STATUSES.operational,
|
||||
consts.CLUSTER_STATUSES.error]
|
||||
consts.CLUSTER_STATUSES.error,
|
||||
consts.CLUSTER_STATUSES.partially_deployed]
|
||||
for status in consts.CLUSTER_STATUSES:
|
||||
cluster.status = status
|
||||
# need commit because rollback is called when handler exits with
|
||||
|
|
|
@ -1204,7 +1204,8 @@ class TestClusterObject(BaseTestCase):
|
|||
allowed = [consts.CLUSTER_STATUSES.new,
|
||||
consts.CLUSTER_STATUSES.stopped,
|
||||
consts.CLUSTER_STATUSES.operational,
|
||||
consts.CLUSTER_STATUSES.error]
|
||||
consts.CLUSTER_STATUSES.error,
|
||||
consts.CLUSTER_STATUSES.partially_deployed]
|
||||
for status in consts.CLUSTER_STATUSES:
|
||||
self.env.clusters[0].status = status
|
||||
self.db.flush()
|
||||
|
|
Loading…
Reference in New Issue