parameters: (_, inbuf, name: Optional[str] = None)
docstring: Add iSCSI gateway configuration. Gateway URL read from -i <file>
docstring_summary: Add iSCSI gateway configuration. Gateway URL read from -i <file>
docstring_tokens: Add iSCSI gateway configuration . Gateway URL read from - i <file >
function: def add_iscsi_gateway(_, inbuf, name: Optional[str] = None):
      '''
      Add iSCSI gateway configuration. Gateway URL read from -i <file>
      '''
      service_url = inbuf
      try:
          IscsiGatewaysConfig.validate_service_url(service_url)
          if name is None:
              name = IscsiClient.instance(service_url=service_url).get_hostname()['data']
          IscsiGatewaysConfig.add_gateway(name, service_url)
          return 0, 'Success', ''
      except IscsiGatewayAlreadyExists as ex:
          return -errno.EEXIST, '', str(ex)
      except InvalidServiceUrl as ex:
          return -errno.EINVAL, '', str(ex)
      except ManagedByOrchestratorException as ex:
          return -errno.EINVAL, '', str(ex)
      except RequestException as ex:
          return -errno.EINVAL, '', str(ex)
function_tokens: def add_iscsi_gateway ( _ , inbuf , name : Optional [ str ] = None ) : service_url = inbuf try : IscsiGatewaysConfig . validate_service_url ( service_url ) if name is None : name = IscsiClient . instance ( service_url = service_url ) . get_hostname ( ) [ 'data' ] IscsiGatewaysConfig . add_gateway ( name , service_url ) return 0 , 'Success' , '' except IscsiGatewayAlreadyExists as ex : return - errno . EEXIST , '' , str ( ex ) except InvalidServiceUrl as ex : return - errno . EINVAL , '' , str ( ex ) except ManagedByOrchestratorException as ex : return - errno . EINVAL , '' , str ( ex ) except RequestException as ex : return - errno . EINVAL , '' , str ( ex )