Esempio n. 1
0
 def create_lbaas(self, lb_name, network_id, cleanup=True, **kwargs):
     '''
     Function to create lbaas , by calling lbaas fixture
     '''
     lbaas_fixture = self.useFixture(
         LBaasV2Fixture(lb_name=lb_name,
                        network_id=network_id,
                        connections=self.connections,
                        **kwargs))
     return lbaas_fixture
Esempio n. 2
0
 def create_lbaas(self, lb_name, network_id, connections=None, verify=True, **kwargs):
     connections = connections or self.connections
     lbaas_fixture = self.create_fixture(LBaasV2Fixture,
                     connections=connections,
                     lb_name=lb_name,
                     network_id=network_id,
                     **kwargs)
     if lbaas_fixture and verify:
         assert lbaas_fixture.verify_lb_in_api_server(), 'LB verificaiton failed'
         lb_fixture = LBaasV2Fixture(connections=self.connections,
                                     lb_uuid=lbaas_fixture.lb_uuid,
                                     listener_uuid=lbaas_fixture.listener_uuid)
         lb_fixture.lb_read()
         lb_fixture.read()
         assert lb_fixture.verify_on_setup(), 'LB verification failed'
     return lbaas_fixture