Add fetching of qe deployments in config tool

This commit is contained in:
Sam Chow 2018-08-06 10:52:56 -04:00
parent 2c61c87712
commit 3d4e43c8d1
24 changed files with 484 additions and 18 deletions

View file

@ -8,12 +8,13 @@ class TransientDirectoryProvider(FileConfigProvider):
from/to the file system, only using temporary directories,
deleting old dirs and creating new ones as requested.
"""
def __init__(self, config_volume, yaml_filename, py_filename):
def __init__(self, config_volume, yaml_filename, py_filename, kubernetes=False):
# Create a temp directory that will be cleaned up when we change the config path
# This should ensure we have no "pollution" of different configs:
# no uploaded config should ever affect subsequent config modifications/creations
temp_dir = TemporaryDirectory()
self.temp_dir = temp_dir
self.kubernetes = kubernetes
super(TransientDirectoryProvider, self).__init__(temp_dir.name, yaml_filename, py_filename)
@property
@ -33,3 +34,9 @@ class TransientDirectoryProvider(FileConfigProvider):
def get_config_dir_path(self):
return self.config_volume
def save_configuration_to_kubernetes(self):
if not self.kubernetes:
raise Exception("Not on kubernetes, cannot save configuration.")
print('do stuf')