def _ApplyIapArgs(self, messages, iap_arg, backend_service):
   if iap_arg is not None:
     backend_service.iap = backend_services_utils.GetIAP(iap_arg, messages)
     if backend_service.iap.enabled:
       log.warning(backend_services_utils.IapBestPracticesNotice())
     if (backend_service.iap.enabled and backend_service.protocol
         is not messages.BackendService.ProtocolValueValuesEnum.HTTPS):
       log.warning(backend_services_utils.IapHttpWarning())
Exemplo n.º 2
0
 def _ApplyIapArgs(self, client, iap_arg, existing, replacement):
   if iap_arg is not None:
     existing_iap = existing.iap
     replacement.iap = backend_services_utils.GetIAP(
         iap_arg, client.messages, existing_iap_settings=existing_iap)
     if replacement.iap.enabled and not (existing_iap and
                                         existing_iap.enabled):
       log.warning(backend_services_utils.IapBestPracticesNotice())
     if (replacement.iap.enabled and replacement.protocol is not
         client.messages.BackendService.ProtocolValueValuesEnum.HTTPS):
       log.warning(backend_services_utils.IapHttpWarning())