@Test public void endpointDefaultRegions() { var spec = DeploymentSpec.fromXml("" + "<deployment>" + " <instance id='default'>" + " <prod>" + " <region active=\"true\">us-east</region>" + " <region active=\"true\">us-west</region>" + " </prod>" + " <endpoints>" + " <endpoint id=\"foo\" container-id=\"bar\">" + " <region>us-east</region>" + " </endpoint>" + " <endpoint id=\"nalle\" container-id=\"frosk\" />" + " <endpoint container-id=\"quux\" />" + " </endpoints>" + " </instance>" + "</deployment>"); assertEquals(Set.of("us-east"), endpointRegions("foo", spec)); assertEquals(Set.of("us-east", "us-west"), endpointRegions("nalle", spec)); assertEquals(Set.of("us-east", "us-west"), endpointRegions("default", spec)); }
public static DeploymentSpec fromXml(Reader reader) { return new DeploymentSpecXmlReader().read(reader); }
DeploymentSpec { public static DeploymentSpec fromXml(Reader reader) { return new DeploymentSpecXmlReader().read(reader); } }
DeploymentSpec { public static DeploymentSpec fromXml(Reader reader) { return new DeploymentSpecXmlReader().read(reader); } DeploymentSpec(List<Step> steps,
                          Optional<Integer> majorVersion,
                          Optional<AthenzDomain> athenzDomain,
                          Optional<AthenzService> athenzService,
                          String xmlForm); }
DeploymentSpec { public static DeploymentSpec fromXml(Reader reader) { return new DeploymentSpecXmlReader().read(reader); } DeploymentSpec(List<Step> steps,
                          Optional<Integer> majorVersion,
                          Optional<AthenzDomain> athenzDomain,
                          Optional<AthenzService> athenzService,
                          String xmlForm); Optional<Integer> majorVersion(); List<Step> steps(); Optional<AthenzDomain> athenzDomain(); Optional<AthenzService> athenzService(); String xmlForm(); Optional<DeploymentInstanceSpec> instance(InstanceName name); DeploymentInstanceSpec requireInstance(String name); DeploymentInstanceSpec requireInstance(InstanceName name); List<InstanceName> instanceNames(); List<DeploymentInstanceSpec> instances(); static DeploymentSpec fromXml(Reader reader); static DeploymentSpec fromXml(String xmlForm); static DeploymentSpec fromXml(String xmlForm, boolean validate); static String toMessageString(Throwable t); @Override boolean equals(Object o); @Override int hashCode(); }
DeploymentSpec { public static DeploymentSpec fromXml(Reader reader) { return new DeploymentSpecXmlReader().read(reader); } DeploymentSpec(List<Step> steps,
                          Optional<Integer> majorVersion,
                          Optional<AthenzDomain> athenzDomain,
                          Optional<AthenzService> athenzService,
                          String xmlForm); Optional<Integer> majorVersion(); List<Step> steps(); Optional<AthenzDomain> athenzDomain(); Optional<AthenzService> athenzService(); String xmlForm(); Optional<DeploymentInstanceSpec> instance(InstanceName name); DeploymentInstanceSpec requireInstance(String name); DeploymentInstanceSpec requireInstance(InstanceName name); List<InstanceName> instanceNames(); List<DeploymentInstanceSpec> instances(); static DeploymentSpec fromXml(Reader reader); static DeploymentSpec fromXml(String xmlForm); static DeploymentSpec fromXml(String xmlForm, boolean validate); static String toMessageString(Throwable t); @Override boolean equals(Object o); @Override int hashCode(); static final DeploymentSpec empty; }