Esempio n. 1
0
 def CommonArgs(parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArg(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION
                                    ]).AddToParser(gke_group)
     # Flags specific to connecting to a Kubernetes cluster (kubeconfig)
     kubernetes_group = flags.GetKubernetesArgGroup(parser)
     flags.AddKubeconfigFlags(kubernetes_group)
     # Flags not specific to any platform
     flags.AddPlatformArg(parser)
     events_flags.AddEventTypeFlagArg(parser)
     events_flags.AddTargetServiceFlag(parser, required=True)
     events_flags.AddBrokerFlag(parser)
     events_flags.AddParametersFlags(parser)
     events_flags.AddSecretsFlag(parser)
     trigger_presentation = presentation_specs.ResourcePresentationSpec(
         'trigger',
         events_resource_args.GetTriggerResourceSpec(),
         'Name of the trigger to create',
         required=True)
     concept_parsers.ConceptParser([trigger_presentation
                                    ]).AddToParser(parser)
Esempio n. 2
0
 def CommonArgs(parser):
   flags.AddEventTypeFlagArg(parser)
   flags.AddSourceFlag(parser)
   flags.AddTargetServiceFlag(parser, required=True)
   flags.AddBrokerFlag(parser)
   flags.AddParametersFlags(parser)
   flags.AddSecretsFlag(parser)
   trigger_presentation = presentation_specs.ResourcePresentationSpec(
       'trigger',
       resource_args.GetTriggerResourceSpec(),
       'Name of the trigger to create',
       required=True)
   concept_parsers.ConceptParser([trigger_presentation]).AddToParser(parser)
Esempio n. 3
0
    def CommonArgs(parser):
        # Flags specific to connecting to a cluster
        cluster_group = serverless_flags.GetClusterArgGroup(parser)
        flags.AddBrokerFlag(cluster_group)

        # Flags not specific to any platform
        flags.AddEventTypeFlagArg(parser)
        flags.AddSourceFlag(parser)
        flags.AddTargetServiceFlag(parser, required=True)
        flags.AddParametersFlags(parser)
        flags.AddSecretsFlag(parser)
        trigger_presentation = presentation_specs.ResourcePresentationSpec(
            'trigger',
            resource_args.GetTriggerResourceSpec(),
            'Name of the trigger to create',
            required=True)
        concept_parsers.ConceptParser([trigger_presentation
                                       ]).AddToParser(parser)
    def CommonArgs(parser):
        # Flags specific to connecting to a cluster
        cluster_group = serverless_flags.GetClusterArgGroup(parser)
        flags.AddBrokerFlag(cluster_group)

        # Flags not specific to any platform
        flags.AddEventTypeFlagArg(parser)
        flags.AddTargetServiceFlag(parser, required=True)
        mutual_with_source_group = parser.add_mutually_exclusive_group()
        flags.AddCustomEventTypeFlag(mutual_with_source_group)
        source_group = mutual_with_source_group.add_group(
            'Configuration parameters for the event source.')
        flags.AddSourceFlag(source_group)
        flags.AddParametersFlags(source_group)
        flags.AddSecretsFlag(source_group)
        trigger_presentation = presentation_specs.ResourcePresentationSpec(
            'trigger',
            resource_args.GetTriggerResourceSpec(),
            'Name of the trigger to create',
            required=True)
        concept_parsers.ConceptParser([trigger_presentation
                                       ]).AddToParser(parser)
Esempio n. 5
0
 def SetUp(self):
     self.parser = calliope_test_util.ArgumentParser()
     flags.AddParametersFlags(self.parser)
     flags.AddSecretsFlag(self.parser)
     flags.AddFiltersFlags(self.parser)
     run_flags.AddPlatformArg(self.parser)