code: def edit(self, instance_id, userdata=None, hostname=None, domain=None,
               notes=None, tags=None):
          
  
          obj = {}
          if userdata:
              self.guest.setUserMetadata([userdata], id=instance_id)
  
          if tags is not None:
              self.set_tags(tags, guest_id=instance_id)
  
          if hostname:
              obj['hostname'] = hostname
  
          if domain:
              obj['domain'] = domain
  
          if notes:
              obj['notes'] = notes
  
          if not obj:
              return True
  
          return self.guest.editObject(obj, id=instance_id)
docs: Edit hostname, domain name, notes, and/or the user data of a VS.
  
          Parameters set to None will be ignored and not attempted to be updated.
  
          :param integer instance_id: the instance ID to edit
          :param string userdata: user data on VS to edit.
                                  If none exist it will be created
          :param string hostname: valid hostname
          :param string domain: valid domain namem
          :param string notes: notes about this particular VS
          :param string tags: tags to set on the VS as a comma separated list.
                              Use the empty string to remove all tags.
          :returns: bool -- True or an Exception
  
          Example::
              # Change the hostname on instance 12345 to 'something'
              result = mgr.edit(instance_id=12345 , hostname="something")
              #result will be True or an Exception