Example #1
0
def versions(request):
    return {
        'cli_version': CliVersion.load(),
        'platfornm_version': PlatformVersion.load(),
        'lib_version': LibVersion.load(),
        'chart_version': ChartVersion.load(),
    }
Example #2
0
 def setUp(self):
     super().setUp()
     self.cli_version = CliVersion.load()
     self.platform_version = PlatformVersion.load()
     self.lib_version = LibVersion.load()
     self.chart_version = ChartVersion.load()
     self.cli_url = '/{}/versions/cli'.format(API_V1)
     self.platform_url = '/{}/versions/platform'.format(API_V1)
     self.lib_url = '/{}/versions/lib'.format(API_V1)
     self.chart_url = '/{}/versions/chart'.format(API_V1)
     self.log_handler_url = '/{}/log_handler'.format(API_V1)
Example #3
0
 def setUp(self):
     super().setUp()
     self.cli_version = CliVersion.load()
     self.platform_version = PlatformVersion.load()
     self.lib_version = LibVersion.load()
     self.chart_version = ChartVersion.load()
     self.cli_url = '/{}/versions/cli'.format(API_V1)
     self.platform_url = '/{}/versions/platform'.format(API_V1)
     self.lib_url = '/{}/versions/lib'.format(API_V1)
     self.chart_url = '/{}/versions/chart'.format(API_V1)
     self.log_handler_url = '/{}/log_handler'.format(API_V1)
Example #4
0
 def retrieve(self, request, *args, **kwargs):
     cli_version = CliVersionConfig.obj_to_dict(CliVersion.load())
     chart_version = ChartVersionConfig.obj_to_dict(ChartVersion.load())
     platform_version = PlatformVersionConfig.obj_to_dict(
         PlatformVersion.load())
     handler_config = LogHandlerConfig(
         dsn=config.cli_dsn,
         environment=config.env,
         tags={
             'cli_min_version': cli_version['min_version'],
             'cli_latest_version': cli_version['latest_version'],
             'platform_min_version': platform_version['min_version'],
             'platform_latest_version': platform_version['latest_version'],
             'chart_version': chart_version['version']
         })
     return Response(handler_config.to_dict())
Example #5
0
 def retrieve(self, request, *args, **kwargs):
     cli_version = CliVersionConfig.obj_to_dict(CliVersion.load())
     chart_version = ChartVersionConfig.obj_to_dict(ChartVersion.load())
     platform_version = PlatformVersionConfig.obj_to_dict(PlatformVersion.load())
     handler_config = LogHandlerConfig(
         dns=config.cli_dns,
         environment=config.env,
         tags={
             'cli_min_version': cli_version['min_version'],
             'cli_latest_version': cli_version['latest_version'],
             'platform_min_version': platform_version['min_version'],
             'platform_latest_version': platform_version['latest_version'],
             'chart_version': chart_version['version']
         }
     )
     return Response(handler_config.to_dict())
Example #6
0
 def retrieve(self, request, *args, **kwargs):
     cli_version = CliVersion.load()
     return Response(CliVersionConfig.obj_to_dict(cli_version))
Example #7
0
 def retrieve(self, request, *args, **kwargs):
     cli_version = CliVersion.load()
     return Response(CliVersionConfig.obj_to_dict(cli_version))