[API replay] Log static routes and SG rule IDs
Provide more information in log about resources being created Change-Id: I85e9160d62d13f79708db8073d355f9f4e231b10
This commit is contained in:
parent
682f71fed1
commit
1eb29d9e61
|
@ -394,6 +394,8 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
|
||||||
body = self.prepare_security_group_rule(sg_rule)
|
body = self.prepare_security_group_rule(sg_rule)
|
||||||
self.dest_neutron.create_security_group_rule(
|
self.dest_neutron.create_security_group_rule(
|
||||||
{'security_group_rule': body})
|
{'security_group_rule': body})
|
||||||
|
LOG.info("Created security group rule for SG "
|
||||||
|
"%s: %s", sg.get('id'), sg_rule.get('id'))
|
||||||
except n_exc.Conflict:
|
except n_exc.Conflict:
|
||||||
# NOTE(arosen): when you create a default
|
# NOTE(arosen): when you create a default
|
||||||
# security group it is automatically populated
|
# security group it is automatically populated
|
||||||
|
@ -451,8 +453,9 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
|
||||||
try:
|
try:
|
||||||
rules = self.dest_neutron.create_security_group_rule(
|
rules = self.dest_neutron.create_security_group_rule(
|
||||||
{'security_group_rules': rules_dict[sg_id]})
|
{'security_group_rules': rules_dict[sg_id]})
|
||||||
LOG.debug("created %s security group rules for SG %s",
|
LOG.info("Created %d security group rules for SG %s: %s",
|
||||||
len(rules), sg_id)
|
len(rules), sg_id,
|
||||||
|
",".join([rule.get('id') for rule in rules]))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.add_error("Failed to create security group %s "
|
self.add_error("Failed to create security group %s "
|
||||||
"rules: %s" % (sg_id, e))
|
"rules: %s" % (sg_id, e))
|
||||||
|
@ -537,9 +540,10 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
|
||||||
try:
|
try:
|
||||||
self.dest_neutron.update_router(router_id,
|
self.dest_neutron.update_router(router_id,
|
||||||
{'router': {'routes': routes}})
|
{'router': {'routes': routes}})
|
||||||
LOG.info("Added routes to router %(rtr)s %(count)s/%(total)s:",
|
LOG.info("Added routes to router %(rtr)s "
|
||||||
|
"%(count)s/%(total)s: %(routes)s",
|
||||||
{'count': count, 'total': total_num,
|
{'count': count, 'total': total_num,
|
||||||
'rtr': router_id})
|
'rtr': router_id, 'routes': routes})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.add_error("Failed to add routes %(routes)s to router "
|
self.add_error("Failed to add routes %(routes)s to router "
|
||||||
"%(rtr)s: %(e)s" %
|
"%(rtr)s: %(e)s" %
|
||||||
|
|
Loading…
Reference in New Issue