code: def set_primary_ip(self, name, vrid, value=None, disable=False,
                         default=False, run=True):
          
  
          if default is True:
              vrrps = self.get(name)
              primary_ip = vrrps[vrid]['primary_ip']
              cmd = "default vrrp %d ip %s" % (vrid, primary_ip)
          elif disable is True or value is None:
              vrrps = self.get(name)
              primary_ip = vrrps[vrid]['primary_ip']
              cmd = "no vrrp %d ip %s" % (vrid, primary_ip)
          elif re.match(r'^\d+\.\d+\.\d+\.\d+$', str(value)):
              cmd = "vrrp %d ip %s" % (vrid, value)
          else:
              raise ValueError("vrrp property 'primary_ip' must be "
                               "a properly formatted IP address")
  
          # Run the command if requested
          if run:
              result = self.configure_interface(name, cmd)
              # And verify the command succeeded
              if result is False:
                  return self.error
              return result
  
          # Otherwise return the formatted command
          return cmd
docs: Set the primary_ip property of the vrrp
  
          Args:
              name (string): The interface to configure.
              vrid (integer): The vrid number for the vrrp to be managed.
              value (string): IP address to be set.
              disable (boolean): Unset primary ip if True.
              default (boolean): Set primary ip to default if True.
              run (boolean): Set to True to execute the command, False to
                  return a string with the formatted command.
  
          Returns:
              If run is True, returns True if the command executed successfully,
              error if failure.
  
              If run is False, returns the formatted command string which can
              be passed to the node