-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from openvstorage/develop
Promote master
- Loading branch information
Showing
8 changed files
with
253 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (C) 2018 iNuron NV | ||
# | ||
# This file is part of Open vStorage Open Source Edition (OSE), | ||
# as available from | ||
# | ||
# http://www.openvstorage.org and | ||
# http://www.openvstorage.com. | ||
# | ||
# This file is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Affero General Public License v3 (GNU AGPLv3) | ||
# as published by the Free Software Foundation, in version 3 as it comes | ||
# in the LICENSE.txt file of the Open vStorage OSE distribution. | ||
# | ||
# Open vStorage is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY of any kind. | ||
|
||
""" | ||
Shared strings | ||
""" | ||
|
||
ARAKOON_NAME = 'cacc' | ||
ARAKOON_NAME_UNITTEST = 'unittest-cacc' | ||
CACC_LOCATION = '/opt/OpenvStorage/config/arakoon_cacc.ini' | ||
CONFIG_STORE_LOCATION = '/opt/OpenvStorage/config/framework.json' | ||
COMPONENTS_KEY = '/ovs/machines/{0}/components' # Format will be the machine ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# -*- coding: UTF-8 -*- | ||
# Copyright (C) 2016 iNuron NV | ||
# | ||
# This file is part of Open vStorage Open Source Edition (OSE), | ||
# as available from | ||
# | ||
# http://www.openvstorage.org and | ||
# http://www.openvstorage.com. | ||
# | ||
# This file is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Affero General Public License v3 (GNU AGPLv3) | ||
# as published by the Free Software Foundation, in version 3 as it comes | ||
# in the LICENSE.txt file of the Open vStorage OSE distribution. | ||
# | ||
# Open vStorage is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY of any kind. | ||
|
||
""" | ||
Test module for the Extensions | ||
""" | ||
|
||
import unittest | ||
from ovs_extensions.generic.toolbox import ExtensionsToolbox | ||
|
||
class ExtensionsToolboxTest(unittest.TestCase): | ||
|
||
def test_filter_dict_for_none(self): | ||
d = {'a': 'a', | ||
'b': {'b1': 'b1', | ||
'b2': None}, | ||
'c': None, | ||
'd': {'d1': {'d11': {'d111': 'd111'}}}, | ||
'e': {'e1': None}} | ||
|
||
result_dict = {'a': 'a', | ||
'b': {'b1': 'b1'}, | ||
'd': {'d1': {'d11': {'d111': 'd111'}}}} | ||
filtered_dict = ExtensionsToolbox.filter_dict_for_none(d) | ||
self.assertEquals(filtered_dict, result_dict) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters