示例#1
0
    def Run(self, args):
        holder = base_classes.ComputeApiHolder(self.ReleaseTrack())
        client = holder.client

        policy_ref = flags.MakeMaintenancePolicyArg().ResolveAsResource(
            args,
            holder.resources,
            scope_lister=compute_flags.GetDefaultScopeLister(holder.client))

        messages = holder.client.messages
        request = messages.ComputeMaintenancePoliciesDeleteRequest(
            maintenancePolicy=policy_ref.Name(),
            project=policy_ref.project,
            region=policy_ref.region)

        service = holder.client.apitools_client.maintenancePolicies
        return client.MakeRequests([(service, 'Delete', request)])
示例#2
0
 def Args(parser):
     flags.MakeMaintenancePolicyArg().AddArgument(parser)
     flags.AddCommonArgs(parser)
     flags.AddCycleFrequencyArgs(parser)
示例#3
0
 def Args(parser):
     flags.MakeMaintenancePolicyArg().AddArgument(parser)
     parser.display_info.AddCacheUpdater(None)
示例#4
0
 def Args(parser):
     flags.MakeMaintenancePolicyArg().AddArgument(parser)