summaryrefslogtreecommitdiff
path: root/src/leap/services/eip/eipconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/services/eip/eipconfig.py')
-rw-r--r--src/leap/services/eip/eipconfig.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/leap/services/eip/eipconfig.py b/src/leap/services/eip/eipconfig.py
index 9e3a9b29..d69e1fd8 100644
--- a/src/leap/services/eip/eipconfig.py
+++ b/src/leap/services/eip/eipconfig.py
@@ -28,7 +28,7 @@ import ipaddr
from leap.common.check import leap_assert, leap_assert_type
from leap.common.config.baseconfig import BaseConfig
from leap.config.providerconfig import ProviderConfig
-from leap.services.eip.eipspec import eipservice_config_spec
+from leap.services.eip.eipspec import get_schema
logger = logging.getLogger(__name__)
@@ -136,12 +136,15 @@ class EIPConfig(BaseConfig):
def __init__(self):
BaseConfig.__init__(self)
+ self._api_version = None
- def _get_spec(self):
+ def _get_schema(self):
"""
- Returns the spec object for the specific configuration
+ Returns the schema corresponding to the version given.
+
+ :rtype: dict or None if the version is not supported.
"""
- return eipservice_config_spec
+ return get_schema(self._api_version)
def get_clusters(self):
# TODO: create an abstraction for clusters
@@ -243,7 +246,7 @@ if __name__ == "__main__":
console.setFormatter(formatter)
logger.addHandler(console)
- eipconfig = EIPConfig()
+ eipconfig = EIPConfig('1')
try:
eipconfig.get_clusters()