code: def cli(env, identifier, domain, userfile, tag, hostname, userdata,
          public_speed, private_speed):
      
  
      if userdata and userfile:
          raise exceptions.ArgumentError(
              '[-u | --userdata] not allowed with [-F | --userfile]')
  
      data = {}
  
      if userdata:
          data['userdata'] = userdata
      elif userfile:
          with open(userfile, 'r') as userfile_obj:
              data['userdata'] = userfile_obj.read()
  
      data['hostname'] = hostname
      data['domain'] = domain
  
      if tag:
          data['tags'] = ','.join(tag)
  
      vsi = SoftLayer.VSManager(env.client)
      vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS')
      if not vsi.edit(vs_id, **data):
          raise exceptions.CLIAbort("Failed to update virtual server")
  
      if public_speed is not None:
          vsi.change_port_speed(vs_id, True, int(public_speed))
  
      if private_speed is not None:
          vsi.change_port_speed(vs_id, False, int(private_speed))
docs: Edit a virtual server's details.