Rename admin_state_up method to avoid conflict with accessor
The admin_state_up(value) method conflicts with the accessor method for the admin_state_up resource parameter. This patch renames it to set_admin_state_up(value) to avoid this conflict. Change-Id: I5a1e23c1541d7ed815ea37f1972abc345e2ba984 Closes-bug: 1532282
This commit is contained in:
parent
41a0480025
commit
023292b59c
@ -142,30 +142,30 @@ EOT
|
||||
end
|
||||
|
||||
def admin_state_up=(value)
|
||||
admin_state_up(value)
|
||||
set_admin_state_up(value)
|
||||
end
|
||||
|
||||
def admin_state_up(value)
|
||||
def set_admin_state_up(value)
|
||||
auth_neutron('router-update', "--admin-state-up=#{value}", name)
|
||||
end
|
||||
|
||||
def distributed=(value)
|
||||
results = auth_neutron("router-show", '--format=shell', resource[:name])
|
||||
attrs = self.class.parse_creation_output(results)
|
||||
admin_state_up(false)
|
||||
set_admin_state_up(false)
|
||||
auth_neutron('router-update', "--distributed=#{value}", name)
|
||||
if attrs['admin_state_up'] == 'True'
|
||||
admin_state_up(true)
|
||||
set_admin_state_up(true)
|
||||
end
|
||||
end
|
||||
|
||||
def ha=(value)
|
||||
results = auth_neutron("router-show", '--format=shell', resource[:name])
|
||||
attrs = self.class.parse_creation_output(results)
|
||||
admin_state_up(false)
|
||||
set_admin_state_up(false)
|
||||
auth_neutron('router-update', "--ha=#{value}", name)
|
||||
if attrs['admin_state_up'] == 'True'
|
||||
admin_state_up(true)
|
||||
set_admin_state_up(true)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user