예제 #1
0
def sre_checkpoints(ctx):
    apps = queries.get_apps()

    parent_apps = {
        app['parentApp']['path']
        for app in apps
        if app.get('parentApp')
    }

    latest_sre_checkpoints = get_latest_sre_checkpoints()

    checkpoints_data = [
        {
            'name': full_name(app),
            'latest': latest_sre_checkpoints.get(full_name(app), '')
        }
        for app in apps
        if (app['path'] not in parent_apps and
            app['onboardingStatus'] == 'OnBoarded')
    ]

    checkpoints_data.sort(key=lambda c: c['latest'], reverse=True)

    columns = ['name', 'latest']
    print_output(ctx.obj['output'], checkpoints_data, columns)
예제 #2
0
 def test_with_parent():
     app = {
         'parentApp': {
             'name': 'app1'
         },
         'name': 'app2',
     }
     assert full_name(app) == 'app1/app2'
 def test_with_parent():
     app = {
         "parentApp": {
             "name": "app1"
         },
         "name": "app2",
     }
     assert full_name(app) == "app1/app2"
예제 #4
0
 def test_without_parent():
     app = {
         'name': 'app2',
     }
     assert full_name(app) == 'app2'
 def test_without_parent():
     app = {
         "name": "app2",
     }
     assert full_name(app) == "app2"