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)
Beispiel #2
0
def GetVmSpecClass(cloud):
    """Returns the VmSpec class corresponding to 'cloud'."""
    return spec.GetSpecClass(BaseVmSpec, CLOUD=cloud)
Beispiel #3
0
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)
Beispiel #5
0
def GetAppServiceSpecClass(service):
    return spec.GetSpecClass(BaseAppServiceSpec, SERVICE=service)
Beispiel #6
0
def GetPlacementGroupSpecClass(cloud):
    """Returns the PlacementGroupSpec class corresponding to 'cloud'."""
    return spec.GetSpecClass(BasePlacementGroupSpec, CLOUD=cloud)
Beispiel #7
0
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)