code: def cli(env, identifier, path, name):
      
      mgr = SoftLayer.TicketManager(env.client)
  
      ticket_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'ticket')
  
      if path is None:
          raise exceptions.ArgumentError("Missing argument --path")
  
      if not os.path.exists(path):
          raise exceptions.ArgumentError("%s not exist" % path)
  
      if name is None:
          name = os.path.basename(path)
  
      attached_file = mgr.upload_attachment(ticket_id=ticket_id,
                                            file_path=path,
                                            file_name=name)
      env.fout("File attached: \n%s" % attached_file)
docs: Adds an attachment to an existing ticket.