Ejemplo n.º 1
0
    def _build_persistent_dict(self):
        name = 'antelope'
        refdes = self._param_dict.get(Parameter.REFDES)
        host = self._param_dict.get(Parameter.DB_ADDR)
        port = self._param_dict.get(Parameter.DB_PORT)

        self._persistent_store = PersistentStoreDict(name, refdes, host=host, port=port)
        if not 'pktid' in self._persistent_store:
            self._persistent_store['pktid'] = ORBOLDEST
Ejemplo n.º 2
0
 def setUp(self):
     self.UNICODE_KEY = "UNICODE_KEY" # Test 'str' type key
     self.UNICODE_VALUES = [u"this is a unicode string", u"this is another unicode string"]
     self.INT_KEY = u"INT_KEY"
     self.INT_VALUES = [1234, 5678]
     self.LONG_KEY = "LONG_KEY" # Test 'str' type key
     self.LONG_VALUES = [sys.maxint + 1, sys.maxint + 2]
     self.FLOAT_KEY = u"FLOAT_KEY"
     self.FLOAT_VALUES = [56.78, 12.34]
     self.BOOL_KEY = "BOOL_KEY" # Test 'str' type key
     self.BOOL_VALUES = [True, False]
     self.DICT_KEY = u"DICT_KEY"
     self.DICT_VALUES = [{u"KEY_1":1, u"KEY_2":2, u"KEY_3":3}, {u"KEY_4":4, u"KEY_5":5, u"KEY_6":6}]
     self.LIST_KEY = "LIST_KEY" # Test 'str' type key
     self.LIST_VALUES = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 0]]
     self.persistentStoreDict = PersistentStoreDict("unit_test", "GI01SUMO-00001")