Class RemoveIpAddressCommand

  • All Implemented Interfaces:
    Command, CommandWithRemoteApi

    public class RemoveIpAddressCommand
    extends MutatingEppToolCommand
    Command to remove external IP Addresses from HostResources identified by text file listing resource ids, one per line.

    Written for b/23757755 so we can clean up records with IP addresses that should always be resolved by hostname.

    The JSON file should contain a list of objects each of which has a "roid" attribute.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String registrarId  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addSoyRecord​(java.lang.String clientId, com.google.template.soy.data.SoyRecord record)  
      protected void addXmlCommand​(java.lang.String clientId, java.lang.String xml)  
      protected boolean dontRunCommand()
      Whether to NOT run the command.
      java.lang.String execute()
      Perform the command and return a result description.
      protected void init()
      Initializes the command.
      protected void initMutatingEppToolCommand()  
      java.lang.String prompt()
      Returns the optional extra confirmation prompt for the command.
      void setConnection​(google.registry.tools.AppEngineConnection connection)  
      protected void setSoyTemplate​(com.google.template.soy.parseinfo.SoyFileInfo soyFileInfo, com.google.template.soy.parseinfo.SoyTemplateInfo soyRenderer)  
      protected static com.google.common.collect.Multimap<java.lang.String,​java.lang.String> validateAndGroupDomainNamesByTld​(java.util.List<java.lang.String> names)
      Helper function for grouping sets of domain names into respective TLDs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface google.registry.tools.Command

        run
    • Field Detail

      • registrarId

        public static java.lang.String registrarId
    • Constructor Detail

      • RemoveIpAddressCommand

        public RemoveIpAddressCommand()
    • Method Detail

      • validateAndGroupDomainNamesByTld

        protected static com.google.common.collect.Multimap<java.lang.String,​java.lang.String> validateAndGroupDomainNamesByTld​(java.util.List<java.lang.String> names)
        Helper function for grouping sets of domain names into respective TLDs. Useful for batched EPP calls when invoking commands (i.e. domain check) with sets of domains across multiple TLDs.
      • setSoyTemplate

        protected void setSoyTemplate​(com.google.template.soy.parseinfo.SoyFileInfo soyFileInfo,
                                      com.google.template.soy.parseinfo.SoyTemplateInfo soyRenderer)
      • setConnection

        public void setConnection​(google.registry.tools.AppEngineConnection connection)
      • addXmlCommand

        protected void addXmlCommand​(java.lang.String clientId,
                                     java.lang.String xml)
      • addSoyRecord

        protected void addSoyRecord​(java.lang.String clientId,
                                    com.google.template.soy.data.SoyRecord record)
      • prompt

        public java.lang.String prompt()
                                throws java.io.IOException
        Description copied from class: ConfirmingCommand
        Returns the optional extra confirmation prompt for the command.
        Overrides:
        prompt in class ConfirmingCommand
        Throws:
        java.io.IOException
      • execute

        public java.lang.String execute()
                                 throws java.lang.Exception
        Description copied from class: ConfirmingCommand
        Perform the command and return a result description.
        Specified by:
        execute in class ConfirmingCommand
        Throws:
        java.lang.Exception
      • init

        protected final void init()
                           throws java.lang.Exception
        Description copied from class: ConfirmingCommand
        Initializes the command.
        Overrides:
        init in class ConfirmingCommand
        Throws:
        java.lang.Exception