def Args(cls, parser): cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy', required=False, include_alpha=cls._include_l7_internal_load_balancing)) 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) group = parser.add_mutually_exclusive_group() cls.SSL_POLICY_ARG = ( ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'HTTPS', required=False)) cls.SSL_POLICY_ARG.AddArgument(group) ssl_policies_flags.GetClearSslPolicyArgumentForOtherResource( 'HTTPS', required=False).AddToParser(group) target_proxies_utils.AddQuicOverrideUpdateArgs(parser)
def Args(cls, parser): parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy')) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, cust_metavar='SSL_CERTIFICATE') cls.TARGET_HTTPS_PROXY_ARG = flags.TargetHttpsProxyArgument() cls.TARGET_HTTPS_PROXY_ARG.AddArgument(parser, operation_type='create') cls.URL_MAP_ARG = url_map_flags.UrlMapArgumentForTargetProxy( proxy_type='HTTPS') cls.URL_MAP_ARG.AddArgument(parser) cls.SSL_POLICY_ARG = ( ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'HTTPS', required=False)) cls.SSL_POLICY_ARG.AddArgument(parser) parser.add_argument( '--description', help='An optional, textual description for the target HTTPS proxy.' ) parser.display_info.AddCacheUpdater(flags.TargetHttpsProxiesCompleter) target_proxies_utils.AddQuicOverrideCreateArgs(parser)
def Args(cls, parser): ssl_certificates_required = not cls._traffic_director_security cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy', required=ssl_certificates_required, include_l7_internal_load_balancing=cls ._include_l7_internal_load_balancing)) 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='create') cls.URL_MAP_ARG = url_map_flags.UrlMapArgumentForTargetProxy( proxy_type='HTTPS', include_l7_internal_load_balancing=cls ._include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser) cls.SSL_POLICY_ARG = ( ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'HTTPS', required=False)) cls.SSL_POLICY_ARG.AddArgument(parser) _Args( parser, include_l7_internal_load_balancing=cls ._include_l7_internal_load_balancing, traffic_director_security=cls._traffic_director_security)
def Args(cls, parser): parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) certs = parser.add_mutually_exclusive_group(required=True) cls.SSL_CERTIFICATE_ARG = ( ssl_certificates_flags.SslCertificateArgumentForOtherResource( 'target HTTPS proxy', required=False)) cls.SSL_CERTIFICATE_ARG.AddArgument(parser, mutex_group=certs) cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy', required=False)) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, mutex_group=certs, cust_metavar='SSL_CERTIFICATE') cls.TARGET_HTTPS_PROXY_ARG = flags.TargetHttpsProxyArgument() cls.TARGET_HTTPS_PROXY_ARG.AddArgument(parser, operation_type='create') cls.URL_MAP_ARG = url_map_flags.UrlMapArgumentForTargetProxy( proxy_type='HTTPS') cls.URL_MAP_ARG.AddArgument(parser) parser.add_argument( '--description', help='An optional, textual description for the target HTTPS proxy.' ) parser.display_info.AddCacheUpdater(flags.TargetHttpsProxiesCompleter)
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')) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, cust_metavar='SSL_CERTIFICATE') 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)
def Args(cls, parser): cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy', required=False)) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, cust_metavar='SSL_CERTIFICATE') cls.TARGET_HTTPS_PROXY_ARG = flags.TargetHttpsProxyArgument() cls.TARGET_HTTPS_PROXY_ARG.AddArgument(parser, operation_type='update') cls.URL_MAP_ARG = url_map_flags.UrlMapArgumentForTargetProxy( required=False, proxy_type='HTTPS') cls.URL_MAP_ARG.AddArgument(parser)
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)) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, cust_metavar='SSL_CERTIFICATE')
def Args(cls, parser): certs = parser.add_mutually_exclusive_group() cls.SSL_CERTIFICATE_ARG = ( ssl_certificates_flags.SslCertificateArgumentForOtherResource( 'target HTTPS proxy', required=False)) cls.SSL_CERTIFICATE_ARG.AddArgument(parser, mutex_group=certs) cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy', required=False)) cls.SSL_CERTIFICATES_ARG.AddArgument( parser, mutex_group=certs, cust_metavar='SSL_CERTIFICATE') cls.TARGET_HTTPS_PROXY_ARG = flags.TargetHttpsProxyArgument() cls.TARGET_HTTPS_PROXY_ARG.AddArgument(parser) cls.URL_MAP_ARG = url_map_flags.UrlMapArgumentForTargetProxy( required=False, proxy_type='HTTPS') cls.URL_MAP_ARG.AddArgument(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(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) certs = parser.add_mutually_exclusive_group() cls.SSL_CERTIFICATE_ARG = ( ssl_certificates_flags.SslCertificateArgumentForOtherResource( 'target SSL proxy', required=False)) cls.SSL_CERTIFICATE_ARG.AddArgument(parser, mutex_group=certs) cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target SSL proxy', required=False)) cls.SSL_CERTIFICATES_ARG.AddArgument( parser, mutex_group=certs, cust_metavar='SSL_CERTIFICATE')
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)) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, cust_metavar='SSL_CERTIFICATE') group = parser.add_mutually_exclusive_group() cls.SSL_POLICY_ARG = ( ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'SSL', required=False)) cls.SSL_POLICY_ARG.AddArgument(group) ssl_policies_flags.GetClearSslPolicyArgumentForOtherResource( 'SSL', required=False).AddToParser(group)
def Args(cls, parser): cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target HTTPS proxy')) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, cust_metavar='SSL_CERTIFICATE') cls.TARGET_HTTPS_PROXY_ARG = flags.TargetHttpsProxyArgument() cls.TARGET_HTTPS_PROXY_ARG.AddArgument(parser, operation_type='create') cls.URL_MAP_ARG = url_map_flags.UrlMapArgumentForTargetProxy( proxy_type='HTTPS') cls.URL_MAP_ARG.AddArgument(parser) cls.SSL_POLICY_ARG = ( ssl_policies_flags.GetSslPolicyArgumentForOtherResource( 'HTTPS', required=False)) cls.SSL_POLICY_ARG.AddArgument(parser) _Args(parser) target_proxies_utils.AddQuicOverrideCreateArgs(parser)
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') certs = parser.add_mutually_exclusive_group(required=True) cls.SSL_CERTIFICATE_ARG = ( ssl_certificates_flags.SslCertificateArgumentForOtherResource( 'target SSL proxy', required=False)) cls.SSL_CERTIFICATE_ARG.AddArgument(parser, mutex_group=certs) cls.SSL_CERTIFICATES_ARG = ( ssl_certificates_flags.SslCertificatesArgumentForOtherResource( 'target SSL proxy', required=False)) cls.SSL_CERTIFICATES_ARG.AddArgument(parser, mutex_group=certs, cust_metavar='SSL_CERTIFICATE') parser.add_argument( '--description', help='An optional, textual description for the target SSL proxy.')