Skip to content

Commit

Permalink
Fixed the bug that cannot delete region.
Browse files Browse the repository at this point in the history
  • Loading branch information
guanxiaohua2k6 committed Feb 8, 2012
1 parent dbe27e3 commit 687af3e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nova/api/ec2/cloud.py
Expand Up @@ -1459,7 +1459,7 @@ def _validate_max_count(max_count):
return self._format_run_instances(context,
reservation_id=instances[0]['reservation_id'])
except Exception as ex:
ofc_utils.delete_region(FLAGS.ofc_service_url, cluster_name, vlan_id)
ofc_utils.remove_region(FLAGS.ofc_service_url, cluster_name, vlan_id)
raise ex

def _do_instance(self, action, context, ec2_id):
Expand Down
2 changes: 1 addition & 1 deletion nova/utils.py
Expand Up @@ -163,7 +163,7 @@ def execute(*cmd, **kwargs):
while attempts > 0:
attempts -= 1
try:
LOG.debug(_('Running cmd (subprocess): %s'), ' '.join(cmd))
#LOG.debug(_('Running cmd (subprocess): %s'), ' '.join(cmd))
_PIPE = subprocess.PIPE # pylint: disable=E1101
obj = subprocess.Popen(cmd,
stdin=_PIPE,
Expand Down
4 changes: 2 additions & 2 deletions nova/virt/dodai/ofc_utils.py
Expand Up @@ -22,7 +22,7 @@ def update_for_terminate_instance(service_url, region_name, server_port1, server
client.service.save()
return

delete_region(service_url, region_name, vlan_id)
remove_region(service_url, region_name, vlan_id)

def create_region(service_url, region_name, vlan_id):
client = Client(service_url + "?wsdl")
Expand All @@ -40,7 +40,7 @@ def create_region(service_url, region_name, vlan_id):
client.service.destroyRegion(region_name)
raise exception.OFCRegionSettingOuterPortAssocFailed(region_name=region_name, vlan_id=vlan_id)

def delete_region(service_url, region_name, vlan_id):
def remove_region(service_url, region_name, vlan_id):
client = Client(service_url + "?wsdl")

switches = db.switch_get_all(None)
Expand Down

0 comments on commit 687af3e

Please sign in to comment.