def _Args(parser, include_l7_internal_load_balancing=False, traffic_director_security=False, certificate_map=False, list_format=None): """Add the target https proxies comamnd line flags to the parser.""" parser.display_info.AddFormat(list_format) parser.add_argument( '--description', help='An optional, textual description for the target HTTPS proxy.') parser.display_info.AddCacheUpdater( flags.TargetHttpsProxiesCompleterAlpha if include_l7_internal_load_balancing else flags.TargetHttpsProxiesCompleter) target_proxies_utils.AddQuicOverrideCreateArgs(parser) if traffic_director_security: flags.AddProxyBind(parser, False) if certificate_map: resource_args.AddCertificateMapResourceArg( parser, 'to attach', name='certificate-map', positional=False, required=False, with_location=False)
def Args(parser): resource_args.AddCertificateMapResourceArg(parser, 'to list map entries for', positional=False) parser.display_info.AddUriFunc(util.CertificateMapEntryUriFunc) parser.display_info.AddFormat(_FORMAT) parser.display_info.AddTransforms(_TRANSFORMS)
def Args(cls, parser): cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy', required=False, include_l7_internal_load_balancing=cls. _include_l7_internal_load_balancing)) if not cls._certificate_map: cls.SSL_CERTIFICATES_ARG.AddArgument( parser, cust_metavar='SSL_CERTIFICATE') cls.TARGET_HTTPS_PROXY_ARG = flags.TargetHttpsProxyArgument( include_l7_internal_load_balancing=cls. _include_l7_internal_load_balancing) cls.TARGET_HTTPS_PROXY_ARG.AddArgument(parser, operation_type='update') cls.URL_MAP_ARG = url_map_flags.UrlMapArgumentForTargetProxy( required=False, proxy_type='HTTPS', include_l7_internal_load_balancing=cls. _include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser) if cls._certificate_map: group = parser.add_mutually_exclusive_group() cert_group = group.add_argument_group() cls.SSL_CERTIFICATES_ARG.AddArgument( cert_group, cust_metavar='SSL_CERTIFICATE') map_group = group.add_mutually_exclusive_group() resource_args.AddCertificateMapResourceArg(map_group, 'to attach', name='certificate-map', positional=False, required=False, with_location=False) resource_args.GetClearCertificateMapArgumentForOtherResource( 'HTTPS proxy').AddToParser(map_group) if cls._regional_ssl_policies: cls.SSL_POLICY_ARG = ssl_policies_flags.GetSslPolicyMultiScopeArgumentForOtherResource( 'HTTPS', required=False) else: cls.SSL_POLICY_ARG = ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'HTTPS', required=False) group = parser.add_mutually_exclusive_group() ssl_policy_group = group.add_argument_group() cls.SSL_POLICY_ARG.AddArgument(ssl_policy_group) ssl_policies_flags.GetClearSslPolicyArgumentForOtherResource( 'HTTPS', required=False).AddToParser(group) target_proxies_utils.AddQuicOverrideUpdateArgs(parser)
def Args(cls, parser): target_proxies_utils.AddProxyHeaderRelatedUpdateArgs(parser) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForTargetSslProxy( required=False)) cls.BACKEND_SERVICE_ARG.AddArgument(parser) cls.TARGET_SSL_PROXY_ARG = flags.TargetSslProxyArgument() cls.TARGET_SSL_PROXY_ARG.AddArgument(parser, operation_type='update') cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target SSL proxy', required=False)) if not cls._certificate_map: cls.SSL_CERTIFICATES_ARG.AddArgument( parser, cust_metavar='SSL_CERTIFICATE') if cls._regional_ssl_policies: cls.SSL_POLICY_ARG = ( ssl_policies_flags. GetSslPolicyMultiScopeArgumentForOtherResource('SSL', required=False)) else: cls.SSL_POLICY_ARG = ( ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'SSL', required=False)) group = parser.add_mutually_exclusive_group() ssl_policy_group = group.add_argument_group() cls.SSL_POLICY_ARG.AddArgument(ssl_policy_group) ssl_policies_flags.GetClearSslPolicyArgumentForOtherResource( 'SSL', required=False).AddToParser(group) if cls._certificate_map: group = parser.add_mutually_exclusive_group(sort_args=False) cls.SSL_CERTIFICATES_ARG.AddArgument( group, cust_metavar='SSL_CERTIFICATE') ssl_certificates_flags.GetClearSslCertificatesArgumentForOtherResource( 'SSL').AddToParser(group) resource_args.AddCertificateMapResourceArg(group, 'to attach', name='certificate-map', positional=False, required=False, with_location=False) resource_args.GetClearCertificateMapArgumentForOtherResource( 'SSL proxy').AddToParser(group)
def Args(cls, parser): target_proxies_utils.AddProxyHeaderRelatedCreateArgs(parser) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForTargetSslProxy()) cls.BACKEND_SERVICE_ARG.AddArgument(parser) cls.TARGET_SSL_PROXY_ARG = flags.TargetSslProxyArgument() cls.TARGET_SSL_PROXY_ARG.AddArgument(parser, operation_type='create') cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target SSL proxy', required=not cls._certificate_map)) if not cls._certificate_map: cls.SSL_CERTIFICATES_ARG.AddArgument( parser, cust_metavar='SSL_CERTIFICATE') if cls._regional_ssl_policies: cls.SSL_POLICY_ARG = ssl_policies_flags.GetSslPolicyMultiScopeArgumentForOtherResource( 'SSL', required=False) else: cls.SSL_POLICY_ARG = ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'SSL', required=False) cls.SSL_POLICY_ARG.AddArgument(parser) parser.add_argument( '--description', help='An optional, textual description for the target SSL proxy.') parser.display_info.AddCacheUpdater(flags.TargetSslProxiesCompleter) parser.display_info.AddFormat(cls._list_format) if cls._certificate_map: group = parser.add_argument_group(required=True) cls.SSL_CERTIFICATES_ARG.AddArgument( group, cust_metavar='SSL_CERTIFICATE') resource_args.AddCertificateMapResourceArg( group, 'to attach', name='certificate-map', positional=False, required=False, with_location=False)
def Args(parser): resource_args.AddCertificateMapResourceArg(parser, 'to delete') flags.AddAsyncFlagToParser(parser)
def Args(parser): resource_args.AddCertificateMapResourceArg(parser, 'to update') labels_util.AddUpdateLabelsFlags(parser) flags.AddDescriptionFlagToParser(parser, 'certificate map') flags.AddAsyncFlagToParser(parser)
def Args(parser): resource_args.AddCertificateMapResourceArg(parser, 'to describe')