~openstack/group-based-policy/master

« back to all changes in this revision

Viewing changes to gbpservice/neutron/services/grouppolicy/drivers/cisco/apic/apic_mapping.py

  • Committer: Gerrit Code Review
  • Author(s): Jenkins
  • Date: 2015-10-05 03:08:53 UTC
  • mfrom: (215.2.1)
  • Revision ID: git-v1:a3ac0fa46592227ae00eb68721e5350dbd8b92c0
Merge "[APIC mapping] Set 'Associated L3Out' for NAT BD"

Show diffs side-by-side

added added

removed removed

Lines of Context:
1413
1413
                        es_name, switch, route['nexthop'] or default_gateway,
1414
1414
                        owner=es_tenant,
1415
1415
                        subnet=route['destination'], transaction=trs)
 
1416
                # set L3-out for NAT-BD
 
1417
                self.apic_manager.set_l3out_for_bd(es_tenant,
 
1418
                    self._get_nat_bd_for_es(context, es), es_name,
 
1419
                    transaction=trs)
1416
1420
        if not is_shadow:
1417
1421
            # create shadow external-networks
1418
1422
            self._plug_l3p_to_es(context, es, True)
1436
1440
            self._unplug_l3p_from_es(context, es, True)
1437
1441
        if (is_shadow or
1438
1442
            not [x for x in es['l3_policies'] if x != context.current['id']]):
1439
 
                self.apic_manager.delete_external_routed_network(
1440
 
                    es_name, owner=es_tenant)
 
1443
                with self.apic_manager.apic.transaction() as trs:
 
1444
                    self.apic_manager.delete_external_routed_network(
 
1445
                        es_name, owner=es_tenant, transaction=trs)
 
1446
                    if not is_shadow:
 
1447
                        self.apic_manager.unset_l3out_for_bd(es_tenant,
 
1448
                            self._get_nat_bd_for_es(context, es), es_name,
 
1449
                            transaction=trs)
1441
1450
 
1442
1451
    def _build_routes_dict(self, routes):
1443
1452
        result = {}