~ubuntu-branches/ubuntu/wily/heat/wily-proposed

« back to all changes in this revision

Viewing changes to heat/tests/test_neutron_network_gateway.py

  • Committer: Package Import Robot
  • Author(s): James Page, Corey Bryant, James Page
  • Date: 2015-03-30 11:11:18 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20150330111118-2qpycylx6swu4yhj
Tags: 2015.1~b3-0ubuntu1
[ Corey Bryant ]
* New upstream milestone release for OpenStack kilo:
  - d/control: Align with upstream dependencies.
  - d/p/sudoers_patch.patch: Rebased.
  - d/p/fix-requirements.patch: Rebased.

[ James Page ]
* d/p/fixup-assert-regex.patch: Tweak test to use assertRegexpMatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from heat.common import exception
24
24
from heat.common import template_format
25
 
from heat.engine.resources.neutron import network_gateway
 
25
from heat.engine.resources.openstack.neutron import network_gateway
26
26
from heat.engine import rsrc_defn
27
27
from heat.engine import scheduler
28
28
from heat.tests import common
182
182
                'port_id': u'32acc49c-899e-44ea-8177-6f4157e12eb4'
183
183
            }
184
184
        })
 
185
        self.stub_NetworkConstraint_validate()
185
186
        if resolve_neutron:
186
187
            neutronV20.find_resourceid_by_name_or_id(
187
188
                mox.IsA(neutronclient.Client),
206
207
                mox.IsA(neutronclient.Client),
207
208
                'network',
208
209
                '6af055d3-26f6-48dd-a597-7611d7e58d35'
209
 
            ).AndReturn('6af055d3-26f6-48dd-a597-7611d7e58d35')
210
 
            neutronV20.find_resourceid_by_name_or_id(
211
 
                mox.IsA(neutronclient.Client),
212
 
                'network',
213
 
                '6af055d3-26f6-48dd-a597-7611d7e58d35'
214
 
            ).AndReturn('6af055d3-26f6-48dd-a597-7611d7e58d35')
 
210
            ).MultipleTimes().AndReturn(
 
211
                '6af055d3-26f6-48dd-a597-7611d7e58d35')
 
212
 
215
213
        neutronclient.Client.disconnect_network_gateway(
216
214
            'ed4c03b9-8251-4c09-acc4-e59ee9e6aa37', {
217
215
                'network_id': u'6af055d3-26f6-48dd-a597-7611d7e58d35',
275
273
        # network, then can delete the network_gateway successful
276
274
        # without residue network_gateway
277
275
        rsrc = self.mock_create_fail_network_not_found_delete_success()
 
276
        self.stub_NetworkConstraint_validate()
278
277
        self.m.ReplayAll()
279
278
 
280
279
        rsrc.validate()
508
507
            }
509
508
        }
510
509
        ).AndRaise(qe.NeutronClientException)
 
510
        self.stub_NetworkConstraint_validate()
511
511
 
512
512
        self.m.ReplayAll()
513
513
 
536
536
        rsrc = network_gateway.NetworkGateway(
537
537
            'test_network_gateway',
538
538
            resource_defns['NetworkGateway'], stack)
 
539
        self.stub_NetworkConstraint_validate()
539
540
 
540
541
        self.m.ReplayAll()
541
542
 
557
558
        rsrc = network_gateway.NetworkGateway(
558
559
            'test_network_gateway',
559
560
            resource_defns['NetworkGateway'], stack)
 
561
        self.stub_NetworkConstraint_validate()
560
562
 
561
563
        self.m.ReplayAll()
562
564