#NEWLINE# def test_cluster_locking_during_deployment( self ) : #NEWLINE# #INDENT# cluster = self . create_env_using_statuses ( consts . CLUSTER_STATUSES . deployment , consts . NODE_STATUSES . deploying ) #NEWLINE# test_nets = self . env . neutron_networks_get ( cluster . id ) . json_body #NEWLINE# resp_nova_net = self . env . nova_networks_put ( cluster . id , test_nets , expect_errors = True ) #NEWLINE# resp_neutron_net = self . env . neutron_networks_put ( cluster . id , test_nets , expect_errors = True ) #NEWLINE# resp_cluster = self . app . put ( reverse ( 'ClusterAttributesHandler' , kwargs = { #NEWLINE# #INDENT# 'cluster_id' : cluster . id , #NEWLINE# #UNINDENT# } ) , jsonutils . dumps ( { #NEWLINE# #INDENT# 'editable' : { #NEWLINE# #INDENT# 'foo' : { #NEWLINE# #INDENT# 'bar' : None , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) , headers = self . default_headers , expect_errors = True ) #NEWLINE# resp_cluster_get = self . app . get ( reverse ( 'ClusterHandler' , kwargs = { #NEWLINE# #INDENT# 'obj_id' : cluster . id , #NEWLINE# #UNINDENT# } ) , headers = self . default_headers ) #NEWLINE# self . assertTrue ( resp_cluster_get . json_body [ 'is_locked' ] ) #NEWLINE# self . assertEqual ( resp_nova_net . status_code , 400 ) #NEWLINE# self . assertEqual ( resp_neutron_net . status_code , 403 ) #NEWLINE# self . assertEqual ( resp_cluster . status_code , 403 )