def __init__(self, dvs_name, connection):
     self.connection = connection
     self.dvs_name = dvs_name
     self._blocked_ports = set()
     self.builder = spec_builder.SpecBuilder(
         self.connection.vim.client.factory)
     self.uplink_map = {}
     try:
         self._dvs, self._datacenter = self._get_dvs(dvs_name, connection)
     except vmware_exceptions.VimException as e:
         raise exceptions.wrap_wmvare_vim_exception(e)
Exemple #2
0
 def setUp(self):
     super(SpecBuilderTestCase, self).setUp()
     self.spec = mock.Mock(name='spec')
     self.factory = mock.Mock(name='factory')
     self.factory.create.return_value = self.spec
     self.builder = spec_builder.SpecBuilder(self.factory)