def with_network(self, is_same_network_as_dss, network, subnetwork): self.is_same_network_as_dss = is_same_network_as_dss if self.is_same_network_as_dss: logging.info("Cluster network/subnetwork is the SAME AS DSS HOST") self.network, self.subnetwork = get_instance_network() else: logging.info("Cluster network/subnetwork is set EXPLICITLY") self.network = _default_if_blank(network, None) self.subnetwork = _default_if_blank(subnetwork, None) logging.info("Cluster network is {}".format(self.network)) logging.info("Cluster subnetwork is {}".format(self.subnetwork)) return self
def with_location(self, location): self.location = _default_if_blank(location, None) return self
def with_resource_group(self, resource_group): self.resource_group = _default_if_blank(resource_group, None) return self
def with_settings_valve(self, settings_valve): self.settings_valve = _default_if_blank(settings_valve, None) return self