~ubuntu-branches/ubuntu/trusty/heat/trusty

« back to all changes in this revision

Viewing changes to heat/engine/resources/internet_gateway.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short
  • Date: 2013-08-08 01:08:42 UTC
  • Revision ID: package-import@ubuntu.com-20130808010842-77cni2v4vlib7rus
Tags: 2013.2~b2-0ubuntu4
[ Chuck Short ]
* debian/rules: Enable testsuite during builds.
* debian/patches/fix-sqlalchemy-0.8.patch: Build against sqlalchemy 0.8.
* debian/patches/rename-quantumclient.patch: quantumclient -> neutronclient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
            deps += (self, route_table)
84
84
 
85
85
    def handle_create(self):
86
 
        client = self.quantum()
 
86
        client = self.neutron()
87
87
        external_network_id = InternetGateway.get_external_network_id(client)
88
88
        for router in self._vpc_route_tables():
89
89
            client.add_gateway_router(router.resource_id, {
90
90
                'network_id': external_network_id})
91
91
 
92
92
    def handle_delete(self):
93
 
        from quantumclient.common.exceptions import QuantumClientException
 
93
        from neutronclient.common.exceptions import NeutronClientException
94
94
 
95
 
        client = self.quantum()
 
95
        client = self.neutron()
96
96
        for router in self._vpc_route_tables():
97
97
            try:
98
98
                client.remove_gateway_router(router.resource_id)
99
 
            except QuantumClientException as ex:
 
99
            except NeutronClientException as ex:
100
100
                if ex.status_code != 404:
101
101
                    raise ex
102
102
 
103
103
 
104
104
def resource_mapping():
105
 
    if clients.quantumclient is None:
 
105
    if clients.neutronclient is None:
106
106
        return {}
107
107
 
108
108
    return {