Beispiel #1
0
 def test_non_empty(self, mock_ask):
     deploy_stanza = {}
     deploy_stanza["pipeline"] = [
         {
             "instancename": "itest",
         },
         {
             "instancename": "push-to-registry",
         },
         {
             "instancename": "mesosstage.canary",
         },
         {
             "instancename": "norcal-devc.main",
             "trigger_next_step_manually": True,
         },
         {
             "instancename": "nova-prod.main.with.extra.dots",
         },
         {
             "instancename": "clustername-without-namespace",
         },
     ]
     expected = set([
         "mesosstage",
         "norcal-devc",
         "nova-prod",
         "clustername-without-namespace",
     ])
     actual = get_clusternames_from_deploy_stanza(deploy_stanza)
     assert expected == actual
Beispiel #2
0
def write_paasta_config(
    srv,
    service_stanza,
    smartstack_stanza,
    monitoring_stanza,
    deploy_stanza,
    marathon_stanza,
):
    srv.io.write_file("service.yaml", _yamlize(service_stanza))
    srv.io.write_file("smartstack.yaml", _yamlize(smartstack_stanza))
    srv.io.write_file("monitoring.yaml", _yamlize(monitoring_stanza))
    srv.io.write_file("deploy.yaml", _yamlize(deploy_stanza))
    srv.io.write_file("marathon-SHARED.yaml", _yamlize(marathon_stanza))

    for clustername in get_clusternames_from_deploy_stanza(deploy_stanza):
        srv.io.symlink_file_relative("marathon-SHARED.yaml", "marathon-%s.yaml" % clustername)
Beispiel #3
0
def write_paasta_config(
    srv,
    service_stanza,
    smartstack_stanza,
    monitoring_stanza,
    deploy_stanza,
    marathon_stanza,
):
    srv.io.write_file("service.yaml", _yamlize(service_stanza))
    srv.io.write_file("smartstack.yaml", _yamlize(smartstack_stanza))
    srv.io.write_file("monitoring.yaml", _yamlize(monitoring_stanza))
    srv.io.write_file("deploy.yaml", _yamlize(deploy_stanza))
    srv.io.write_file("marathon-SHARED.yaml", _yamlize(marathon_stanza))

    for clustername in get_clusternames_from_deploy_stanza(deploy_stanza):
        srv.io.symlink_file_relative("marathon-SHARED.yaml",
                                     "marathon-%s.yaml" % clustername)
Beispiel #4
0
 def test_non_empty(self, mock_ask):
     deploy_stanza = {}
     deploy_stanza["pipeline"] = [
         {"instancename": "itest", },
         {"instancename": "push-to-registry", },
         {"instancename": "mesosstage.canary", },
         {"instancename": "norcal-devc.main", "trigger_next_step_manually": True, },
         {"instancename": "nova-prod.main.with.extra.dots", },
         {"instancename": "clustername-without-namespace", },
     ]
     expected = set([
         "mesosstage",
         "norcal-devc",
         "nova-prod",
         "clustername-without-namespace",
     ])
     actual = get_clusternames_from_deploy_stanza(deploy_stanza)
     assert expected == actual
Beispiel #5
0
 def test_empty(self, mock_ask):
     deploy_stanza = {}
     expected = set()
     actual = get_clusternames_from_deploy_stanza(deploy_stanza)
     assert expected == actual
Beispiel #6
0
 def test_empty(self, mock_ask):
     deploy_stanza = {}
     expected = set()
     actual = get_clusternames_from_deploy_stanza(deploy_stanza)
     assert expected == actual