Esempio n. 1
0
 def Args(parser):
     Delete.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument(
         plural=True)
     Delete.HTTP_HEALTH_CHECK_ARG.AddArgument(parser,
                                              operation_type='delete')
     parser.display_info.AddCacheUpdater(completers.HealthChecksCompleter)
Esempio n. 2
0
    def Args(cls, parser):
        cls.HTTP_HEALTH_CHECKS_ARG = flags.HttpHealthCheckArgument()
        cls.HTTP_HEALTH_CHECKS_ARG.AddArgument(parser, operation_type='update')

        parser.add_argument('--host',
                            help="""\
        The value of the host header used in this HTTP health check request.
        By default, this is empty and Google Compute Engine automatically sets
        the host header in health requests to the same external IP address as
        the forwarding rule associated with the target pool. Setting this to
        an empty string will clear any existing host value.
        """)

        parser.add_argument('--port',
                            type=int,
                            help="""\
        The TCP port number that this health check monitors.
        """)

        parser.add_argument('--request-path',
                            help="""\
        The request path that this health check monitors. For example,
        ``/healthcheck''.
        """)

        parser.add_argument('--check-interval',
                            type=arg_parsers.Duration(),
                            help="""\
        How often to perform a health check for an instance. For example,
        specifying ``10s'' will run the check every 10 seconds.
        See $ gcloud topic datetimes for information on duration formats.
        """)

        parser.add_argument('--timeout',
                            type=arg_parsers.Duration(),
                            help="""\
        If Google Compute Engine doesn't receive an HTTP 200 response from the
        instance by the time specified by the value of this flag, the health
        check request is considered a failure. For example, specifying ``10s''
        will cause the check to wait for 10 seconds before considering the
        request a failure.  Valid units for this flag are ``s'' for seconds and
        ``m'' for minutes.
        """)

        parser.add_argument('--unhealthy-threshold',
                            type=int,
                            help="""\
        The number of consecutive health check failures before a healthy
        instance is marked as unhealthy.
        """)

        parser.add_argument('--healthy-threshold',
                            type=int,
                            help="""\
        The number of consecutive successful health checks before an
        unhealthy instance is marked as healthy.
        """)

        parser.add_argument(
            '--description',
            help=(
                'A textual description for the HTTP health check. Pass in an '
                'empty string to unset.'))
Esempio n. 3
0
    def Args(cls, parser):
        parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT)
        cls.HTTP_HEALTH_CHECKS_ARG = flags.HttpHealthCheckArgument()
        cls.HTTP_HEALTH_CHECKS_ARG.AddArgument(parser, operation_type='create')
        parser.display_info.AddCacheUpdater(
            completers.HttpHealthChecksCompleter)

        parser.add_argument('--host',
                            help="""\
        The value of the host header used in this HTTP health check request.
        By default, this is empty and Google Compute Engine automatically sets
        the host header in health requests to the same external IP address as
        the forwarding rule associated with the target pool.
        """)

        parser.add_argument('--port',
                            type=int,
                            default=80,
                            help="""\
        The TCP port number that this health check monitors. The default value
        is 80.
        """)

        parser.add_argument('--request-path',
                            default='/',
                            help="""\
        The request path that this health check monitors. For example,
        ``/healthcheck''. The default value is ``/''.
        """)

        parser.add_argument('--check-interval',
                            type=arg_parsers.Duration(),
                            default='5s',
                            help="""\
        How often to perform a health check for an instance. For example,
        specifying ``10s'' will run the check every 10 seconds. The default
        value is ``5s''. See $ gcloud topic datetimes for information on
        duration formats.
        """)

        parser.add_argument('--timeout',
                            type=arg_parsers.Duration(),
                            default='5s',
                            help="""\
        If Google Compute Engine doesn't receive an HTTP 200 response from the
        instance by the time specified by the value of this flag, the health
        check request is considered a failure. For example, specifying ``10s''
        will cause the check to wait for 10 seconds before considering the
        request a failure. The default value is ``5s''.
        See $ gcloud topic datetimes for information on duration formats.
        """)

        parser.add_argument('--unhealthy-threshold',
                            type=int,
                            default=2,
                            help="""\
        The number of consecutive health check failures before a healthy
        instance is marked as unhealthy. The default is 2.
        """)

        parser.add_argument('--healthy-threshold',
                            type=int,
                            default=2,
                            help="""\
        The number of consecutive successful health checks before an
        unhealthy instance is marked as healthy. The default is 2.
        """)

        parser.add_argument(
            '--description',
            help='An optional, textual description for the HTTP health check.')
Esempio n. 4
0
 def Args(parser):
   Delete.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument(plural=True)
   Delete.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, operation_type='delete')
Esempio n. 5
0
 def Args(parser):
   Describe.HTTP_HEALTH_CHECK = flags.HttpHealthCheckArgument()
   Describe.HTTP_HEALTH_CHECK.AddArgument(parser, operation_type='describe')