Ejemplo n.º 1
0
 def setUp(self):
     '''Creates with in-memory DB'''
     self.__conf = {}
     self.__conf['outputDir'] = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'out')
     self.__conf['dbUrl'] = 'sqlite:///'
     self.__conf['writeConfigInFile'] = 'false'
     self.__conf['logLevel'] = { 
             'fabric' : 'INFO',
             'reporting' : 'INFO',
             'ztp' : 'INFO',
             'rest' : 'INFO',
             'writer' : 'INFO',
             'devicePlugin' : 'INFO',
             'trapd' : 'INFO',
             'dao' : 'INFO'
     }
     self.__conf['DOT'] = {'ranksep' : '5 equally', 'colors': ['red', 'green', 'blue']}
     self.__conf['deviceFamily'] = {
         "qfx5100-24q-2p": {
             "ports": 'et-0/0/[0-23]'
         },
         "qfx5100-48s-6q": {
             "uplinkPorts": 'et-0/0/[48-53]', 
             "downlinkPorts": 'xe-0/0/[0-47]'
         }
     }
     self._dao = InMemoryDao.getInstance()
Ejemplo n.º 2
0
 def setUp(self):
     '''Creates with in-memory DB'''
     self.__conf = {}
     self.__conf['outputDir'] = os.path.join(
         os.path.dirname(os.path.abspath(__file__)), 'out')
     self.__conf['dbUrl'] = 'sqlite:///'
     self.__conf['writeConfigInFile'] = 'false'
     self.__conf['logLevel'] = {
         'fabric': 'INFO',
         'reporting': 'INFO',
         'ztp': 'INFO',
         'rest': 'INFO',
         'writer': 'INFO',
         'devicePlugin': 'INFO',
         'trapd': 'INFO',
         'dao': 'INFO'
     }
     self.__conf['DOT'] = {
         'ranksep': '5 equally',
         'colors': ['red', 'green', 'blue']
     }
     self.__conf['deviceFamily'] = {
         "qfx5100-24q-2p": {
             "ports": 'et-0/0/[0-23]'
         },
         "qfx5100-48s-6q": {
             "uplinkPorts": 'et-0/0/[48-53]',
             "downlinkPorts": 'xe-0/0/[0-47]'
         }
     }
     self._dao = InMemoryDao.getInstance()
Ejemplo n.º 3
0
 def setUp(self):
     if not os.path.exists(configLocation):
         os.makedirs(configLocation)
     self._dao = InMemoryDao.getInstance()
     self._conf = {'httpServer': {'ipAddr': '1.2.3.4', 'port': 9090}}
     self.restServer = RestServer(self._conf, InMemoryDao)
     self.restServer.initRest()
     self.restServerTestApp = TestApp(self.restServer.app)
Ejemplo n.º 4
0
 def setUp(self):
     if not os.path.exists(configLocation):
         os.makedirs(configLocation)
     self._dao = InMemoryDao.getInstance()
     self._conf = {'httpServer': {'ipAddr': '1.2.3.4', 'port': 9090}}
     self.restServer = RestServer(self._conf, InMemoryDao)
     self.restServer.initRest()
     self.restServerTestApp = TestApp(self.restServer.app)
Ejemplo n.º 5
0
 def setUp(self):
     self.__conf = {
         'deviceFamily': {
             "qfx5100-48s-6q": {
                 "uplinkPorts": 'et-0/0/[48-53]',
                 "downlinkPorts": 'xe-0/0/[0-47]'
             }
         }
     }
     self._dao = InMemoryDao.getInstance()
Ejemplo n.º 6
0
 def setUp(self):
     self.__conf = {
         "deviceFamily": {
             "qfx5100-48s-6q": {"uplinkPorts": "et-0/0/[48-53]", "downlinkPorts": "xe-0/0/[0-47]"},
             "ex4300-24p": {"uplinkPorts": "et-0/1/[0-3]", "downlinkPorts": "ge-0/0/[0-23]"},
         }
     }
     self._dao = InMemoryDao.getInstance()
     self.configurator = TwoStageConfigurator("192.168.48.219", self.__conf, InMemoryDao)
     self.configurator.manualInit()
Ejemplo n.º 7
0
 def setUp(self):
     self._conf = {}
     self._conf["outputDir"] = os.path.join(os.path.dirname(os.path.abspath(__file__)), "out")
     self._conf["deviceFamily"] = {
         "qfx5100-24q-2p": {"ports": "et-0/0/[0-23]"},
         "qfx5100-48s-6q": {"uplinkPorts": "et-0/0/[48-53]", "downlinkPorts": "xe-0/0/[0-47]"},
         "ex4300-24p": {"uplinkPorts": "et-0/1/[0-3]", "downlinkPorts": "ge-0/0/[0-23]"},
     }
     self._dao = InMemoryDao.getInstance()
     self.l3ClosMediation = L3ClosMediation(self._conf, InMemoryDao)
Ejemplo n.º 8
0
 def setUp(self):
     self._conf = {}
     self._conf['outputDir'] = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'out')
     self._conf['DOT'] = {'ranksep' : '5 equally', 'colors': ['red', 'green', 'blue']}
     self._conf['deviceFamily'] = {
         "qfx-5100-24q-2p": {
             "ports": 'et-0/0/[0-23]'
         },
         "qfx-5100-48s-6q": {
             "uplinkPorts": 'et-0/0/[48-53]', 
             "downlinkPorts": 'xe-0/0/[0-47]'
         }
     }
     self._dao = InMemoryDao.getInstance()
     ''' Deletes 'out' folder under test dir'''
     shutil.rmtree(self._conf['outputDir'], ignore_errors=True)
Ejemplo n.º 9
0
 def setUp(self):
     self.__conf = {
         'deviceFamily': {
             "qfx5100-48s-6q": {
                 "uplinkPorts": 'et-0/0/[48-53]',
                 "downlinkPorts": 'xe-0/0/[0-47]'
             },
             "ex4300-24p": {
                 "uplinkPorts": 'et-0/1/[0-3]',
                 "downlinkPorts": 'ge-0/0/[0-23]'
             }
         }
     }
     self._dao = InMemoryDao.getInstance()
     self.configurator = TwoStageConfigurator('192.168.48.219', self.__conf,
                                              InMemoryDao)
     self.configurator.manualInit()
Ejemplo n.º 10
0
 def setUp(self):
     self._conf = {}
     self._conf['outputDir'] = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'out')
     self._conf['deviceFamily'] = {
         "qfx5100-24q-2p": {
             "ports": 'et-0/0/[0-23]'
         },
         "qfx5100-48s-6q": {
             "uplinkPorts": 'et-0/0/[48-53]', 
             "downlinkPorts": 'xe-0/0/[0-47]'
         },
         "ex4300-24p": {
             "uplinkPorts": 'et-0/1/[0-3]', 
             "downlinkPorts": 'ge-0/0/[0-23]'
         }
     }
     self._dao = InMemoryDao.getInstance()
     self.l3ClosMediation = L3ClosMediation(self._conf, InMemoryDao)
Ejemplo n.º 11
0
 def setUp(self):
     self._conf = {}
     self._conf['outputDir'] = os.path.join(
         os.path.dirname(os.path.abspath(__file__)), 'out')
     self._conf['deviceFamily'] = {
         "qfx5100-24q-2p": {
             "ports": 'et-0/0/[0-23]'
         },
         "qfx5100-48s-6q": {
             "uplinkPorts": 'et-0/0/[48-53]',
             "downlinkPorts": 'xe-0/0/[0-47]'
         },
         "ex4300-24p": {
             "uplinkPorts": 'et-0/1/[0-3]',
             "downlinkPorts": 'ge-0/0/[0-23]'
         }
     }
     self._dao = InMemoryDao.getInstance()
     self.l3ClosMediation = L3ClosMediation(self._conf, InMemoryDao)
Ejemplo n.º 12
0
    def setUp(self):
        self.__conf = {}
        self.__conf['httpServer'] = {'ipAddr': '127.0.0.1'}

        self.ztpServer = ZtpServer(self.__conf, daoClass = InMemoryDao)
        self._dao = InMemoryDao.getInstance()
Ejemplo n.º 13
0
 def tearDown(self):
     shutil.rmtree(os.path.join(configLocation, 'test1'),
                   ignore_errors=True)
     self.restServer._reset()
     InMemoryDao._destroy()
Ejemplo n.º 14
0
 def setUp(self):
     self._dao = InMemoryDao.getInstance()
     self.dataCollector = DeviceDataCollectorNetconf(
         '1234', {}, InMemoryDao)
Ejemplo n.º 15
0
 def tearDown(self):
     shutil.rmtree(os.path.join(configLocation, 'test1'), ignore_errors=True)
     self.restServer._reset()
     InMemoryDao._destroy()
Ejemplo n.º 16
0
 def tearDown(self):
     ''' Deletes 'out' folder under test dir'''
     shutil.rmtree(self._conf['outputDir'], ignore_errors=True)
     InMemoryDao._destroy()
Ejemplo n.º 17
0
 def tearDown(self):
     self._dao = None
     self.configurator = None
     InMemoryDao._destroy()
Ejemplo n.º 18
0
    def setUp(self):
        self.__conf = {}
        self.__conf['httpServer'] = {'ipAddr': '127.0.0.1'}

        self.ztpServer = ZtpServer(self.__conf, daoClass=InMemoryDao)
        self._dao = InMemoryDao.getInstance()
Ejemplo n.º 19
0
 def setUp(self):
     self.__conf = {'deviceFamily': {"qfx5100-48s-6q": {"uplinkPorts": 'et-0/0/[48-53]', "downlinkPorts": 'xe-0/0/[0-47]'},
                                  "ex4300-24p": {"uplinkPorts": 'et-0/1/[0-3]', "downlinkPorts": 'ge-0/0/[0-23]'}}}
     self._dao = InMemoryDao.getInstance()
     self.configurator = TwoStageConfigurator('192.168.48.219', self.__conf, InMemoryDao)
     self.configurator.manualInit()
Ejemplo n.º 20
0
 def setUp(self):
     self._dao = InMemoryDao.getInstance()
     self.dataCollector = DeviceDataCollectorNetconf('1234', {}, InMemoryDao)
Ejemplo n.º 21
0
 def setUp(self):
     self.__conf = {'deviceFamily': {"qfx5100-48s-6q": {"uplinkPorts": 'et-0/0/[48-53]', "downlinkPorts": 'xe-0/0/[0-47]'}}}
     self._dao = InMemoryDao.getInstance()
Ejemplo n.º 22
0
 def tearDown(self):
     ''' Deletes 'out' folder under test dir'''
     shutil.rmtree(self._conf['outputDir'], ignore_errors=True)
     InMemoryDao._destroy()
     self.l3ClosMediation = None
Ejemplo n.º 23
0
 def tearDown(self):
     InMemoryDao._destroy()
Ejemplo n.º 24
0
 def tearDown(self):
     InMemoryDao._destroy()
Ejemplo n.º 25
0
 def tearDown(self):
     """ Deletes 'out' folder under test dir"""
     shutil.rmtree(self._conf["outputDir"], ignore_errors=True)
     InMemoryDao._destroy()
     self.l3ClosMediation = None
Ejemplo n.º 26
0
 def tearDown(self):
     self._dao = None
     self.configurator = None
     InMemoryDao._destroy()
Ejemplo n.º 27
0
 def tearDown(self):
     self._dao = None
     InMemoryDao._destroy()
Ejemplo n.º 28
0
 def tearDown(self):
     self._dao = None
     InMemoryDao._destroy()
Ejemplo n.º 29
0
 def setUp(self):
     self.__conf = {
         "deviceFamily": {"qfx5100-48s-6q": {"uplinkPorts": "et-0/0/[48-53]", "downlinkPorts": "xe-0/0/[0-47]"}}
     }
     self._dao = InMemoryDao.getInstance()