def CreateAwsPlacementGroupSpec(group_style=STRATEGY): spec_class = spec.GetSpecClass(placement_group.BasePlacementGroupSpec, CLOUD=CLOUD) FLAGS.placement_group_style = group_style name = '{0}.placement_group_spec.{1}'.format(spec_class.SPEC_TYPE, CLOUD), return spec_class(name, zone=ZONE, flag_values=FLAGS)
def GetVmSpecClass(cloud): """Returns the VmSpec class corresponding to 'cloud'.""" return spec.GetSpecClass(BaseVmSpec, CLOUD=cloud)
def GetDiskSpecClass(cloud): """Get the DiskSpec class corresponding to 'cloud'.""" return spec.GetSpecClass(BaseDiskSpec, CLOUD=cloud)
def GetSpannerSpecClass(service_type) -> Optional[spec.BaseSpecMetaClass]: """Return the SpannerSpec class corresponding to 'service_type'.""" return spec.GetSpecClass(SpannerSpec, SERVICE_TYPE=service_type)
def GetAppServiceSpecClass(service): return spec.GetSpecClass(BaseAppServiceSpec, SERVICE=service)
def GetPlacementGroupSpecClass(cloud): """Returns the PlacementGroupSpec class corresponding to 'cloud'.""" return spec.GetSpecClass(BasePlacementGroupSpec, CLOUD=cloud)
def GetNonRelationalDbSpecClass( service_type: str) -> Optional[spec.BaseSpecMetaClass]: """Gets the non-relational db spec class corresponding to 'service_type'.""" return spec.GetSpecClass(BaseNonRelationalDbSpec, SERVICE_TYPE=service_type)