Origen remotes and HTTP files

22 views Asked by At

We use remotes extensively and the request came about how Origen handles straight links to HTTP files versus revision control systems. Can Origen remotes just put an HTTP link as the vault?

Origen.config.remotes do
  [
    {
      dir: "mydir",
      vault: "http://mycompany/fileserver/myspreadsheet.xlsx"
    }
  ]
end
1

There are 1 answers

0
Ginty On BEST ANSWER

This is not currently supported, but should not be too difficult for you to add.

The remotes system uses the Origen revision control API under the hood and passes the given rc_url: (or vault: as in this example, which is an alias) option to the revision control API to deal with - https://github.com/Origen-SDK/origen/blob/master/lib/origen/remote_manager.rb#L140

So, if you were to add an http(s) revision control driver to Origen, then http remote urls should work - https://github.com/Origen-SDK/origen/blob/master/lib/origen/revision_control.rb

Note that for such an http revision control driver, you would not need to support all the API (commit, etc), just the remotes_method which is defined as checkout by default, but could actually be anything you like, e.g. get might be more appropriate for a fetch over http - https://github.com/Origen-SDK/origen/blob/921248e1e8514f28284ff7fca74f9ccf2243d061/lib/origen/revision_control/base.rb#L32