def test_json_data_customized_url(self): object_type = 'randomtestobject' data = 'testdata' journal.register_url_builder(object_type, lambda row: row.object_type) row = models.OpenDaylightJournal(object_type=object_type, object_uuid=uuidutils.generate_uuid(), operation=odl_const.ODL_CREATE, data=data) url_param = self.journal._json_data(row) self.assertEqual(object_type, url_param[1])
def test_json_data_customized_url(self): object_type = 'randomtestobject' data = 'testdata' journal.register_url_builder(object_type, lambda row: row.object_type) row = models.OpenDaylightJournal(object_type=object_type, object_uuid=uuidutils.generate_uuid(), operation=odl_const.ODL_CREATE, data=data) url_param = self.journal._json_data(row) self.assertEqual(object_type, url_param[1])
def __init__(self, driver): super(ODLMemberManager, self).__init__( driver, odl_const.ODL_MEMBER) journal.register_url_builder(odl_const.ODL_MEMBER, self.lbaas_member_url_builder)