def _get_fabric_fixture(self, name):
     fabric = FabricFixture(connections=self.connections,
                            name=name)
     fabric.read()
     if not fabric.uuid:
         return (False, None)
     return (True, fabric)
예제 #2
0
 def _get_fabric_fixture(self, name):
     fabric = FabricFixture(connections=self.connections,
                            name=name)
     fabric.read()
     if not fabric.uuid:
         return (False, None)
     return (True, fabric)
 def create_only_fabric(cls, namespaces=None, creds=None):
     '''
     :param namespaces : namespaces in below format
                     eg: {'management': [{'cidr': '1.1.1.0/24',
                                          'gateway': '1.1.1.254'}],
                          'loopback': ['10.1.1.0/25'],
                          'peer': ['172.16.0.0/16'],
                          'asn': [{'max': 64512, 'min': 64512}],
                          'ebgp_asn': [{'max': 64512, 'min': 64512}]}
     :param creds : list of creds in the below format
                eg: [{'username': '******', 'password': '******',
                      'vendor': 'Juniper', 'device_family': 'qfx'}]
     '''
     fabric = FabricFixture(connections=cls.connections,
                            namespaces=namespaces,
                            creds=creds)
     fabric.setUp()
     return fabric
예제 #4
0
 def create_fabric(self, **kwargs):
     return self.useFixture(FabricFixture(connections=self.connections,
                                          **kwargs))