• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

conf/H03-May-2022-2420

doc/H03-May-2022-4,8683,763

example/H03-May-2022-337198

include/ignition/fuel_tools/H03-May-2022-1,709569

src/H03-May-2022-6,3424,383

test/H03-May-2022-31,85820,862

tools/H03-May-2022-5,9363,733

tutorials/H03-May-2022-522400

AUTHORSH A D30-May-201814 21

COPYINGH A D30-May-20189.9 KiB179150

Changelog.mdH A D30-May-20183.2 KiB6845

INSTALL_WINDOWS.mdH A D30-May-20181.5 KiB4929

LICENSEH A D30-May-2018617 1611

Migration.mdH A D30-May-2018869 3622

NEWSH A D30-May-201846 11

README.mdH A D30-May-20185.2 KiB167132

bitbucket-pipelines.ymlH A D30-May-20181.5 KiB4442

codecov.ymlH A D30-May-201827 32

configure.batH A D30-May-20181.2 KiB2921

README.md

1# Ignition Fuel Tools
2
3** Classes and tools for interacting with Ignition Fuel **
4
5Ignition Fuel Tools is composed by a client library and command line tools for
6interacting with Ignition Fuel servers.
7
8  [http://bitbucket.org/ignitionrobotics/ign-fuel-tools](http://bitbucket.org/ignitionrobotics/ign-fuel-tools)
9
10Test coverage reports are available at Codecov:
11
12[![codecov](https://codecov.io/bb/ignitionrobotics/ign-fuel-tools/branch/default/graph/badge.svg)](https://codecov.io/bb/ignitionrobotics/ign-fuel-tools)
13
14# Building and installing
15
16```
17cd ign-fuel-tools
18mkdir build
19cd build
20cmake ../
21make
22make test
23make install
24```
25
26Make sure `IGN_CONFIG_PATH` is set to the right install location`ign fuel` will work.
27Default is `/usr/local/share/ignition`.
28
29
30## Examples
31
32** List all models **
33```
34$ ign fuel list | head
35https://ignitionfuel.org/anonymous/test_model_595389531
36https://ignitionfuel.org/anonymous/test_model_122023392
37https://ignitionfuel.org/anonymous/test_model_429486665
38https://ignitionfuel.org/anonymous/test_model_887243621
39https://ignitionfuel.org/anonymous/test_model_084900530
40https://ignitionfuel.org/anonymous/test_model_240061059
41https://ignitionfuel.org/anonymous/test_model_464734097
42https://ignitionfuel.org/anonymous/test_model_658598990
43https://ignitionfuel.org/anonymous/test_model_834617935
44https://ignitionfuel.org/anonymous/test_model_380348669
45```
46
47** Find a model on disk **
48```
49$ ign fuel locate --name am1
50/home/developer/.ignition/fuel/staging_ignitionfuel/alice/am1
51```
52
53** C++ Get List models **
54```
55  // Create a ClientConfig, TODO create this from a yaml file
56  ignition::fuel_tools::ClientConfig conf;
57  ignition::fuel_tools::ServerConfig srv;
58  srv.URL("https://ignitionfuel.org/");
59  srv.LocalName("ignitionfuel");
60  conf.AddServer(srv);
61
62  ignition::fuel_tools::FuelClient client(conf);
63  ignition::fuel_tools::ModelIter iter = client.Models();
64  while (iter)
65  {
66    std::cout << "Got model: " << iter->Identification().Name() << "\n";
67  }
68```
69
70## TODO
71
72See issues beginning with [Fuel backend] in the title. Here are two examples.
73
74** TODO: Upload **
75```
76$ ign fuel push --owner trudy --name car --url https://ignitionfuel.org/ --path models/car
77TODO Upload a model
78```
79
80** TODO: Download**
81```
82$ ign fuel pull --owner bob --name traffic_signal
83TODO Download a model
84```
85
86## Dependencies
87On ubuntu run
88```
89sudo apt install ruby-ffi libzip-dev libcurl-dev libjsoncpp-dev
90```
91
92## Continuous integration
93
94Please refer to the [Bitbucket Pipelines](https://bitbucket.org/ignitionrobotics/ign-fuel-tools/addon/pipelines/home#!/).
95
96
97## Documentation
98
99Check [here](http://ignition-fuel-tools.readthedocs.io/en/default/).
100
101[![Documentation Status](https://readthedocs.org/projects/ignition-fuel-tools/badge/?version=default)](https://readthedocs.org/projects/ignition-fuel-tools/?badge=default)
102
103
104## Roadmap
105
106* Create a YAML configuration file and parse it as part of the ClientConfig class.
107
108~~~
109# The list of asset sources.
110sources:
111  osrf_local:
112    url: https://localhost:8080
113    api_key: r1CJIKTadlpS1IWt9jivf2sqGJAkbvSQoIMIubrn
114
115  osrf_public:
116    url: https://staging-api.ignitionfuel.org
117    api_key: sdfpWzZZbdixQ3zZbzxQzG4WPRlMT6DgUthvsfZ7
118
119  local:
120    url: file:///home/caguero/.ignition/fuel/
121~~~
122* Create the notion of "asset repository" or similar. An asset repository abstracts an entity that can store assets. It can be local or remote. This is the interface for "asset repository":
123    * List(category).
124        E.g.: localRepository.List("models")
125        remote1Repository.List("models")
126    * Details(assetIdentifier).
127        E.g.: Modeldentifier model;
128        model.Owner("the_owner");
129        model.Name("the_name");
130        localRepository.Details(model)
131        remote1Repository.Details(model)
132    * Create(assetIdentifier, path_to_the_asset).
133        E.g.: Modeldentifier model;
134        model.Owner("the_owner");
135        model.Name("the_name");
136        localRepository.Create(model, path_to_the_asset)
137        remote1Repository.Create(model, path_to_the_asset)
138    * Delete(assetIdentifier).
139        E.g.: Modeldentifier model;
140        model.Owner("the_owner");
141        model.Name("the_name");
142        localRepository.Delete(model)
143        remote1Repository.Delete(model)
144     * CopyTo(assetIdentifier, dst_repository).
145        E.g.: Modeldentifier model;
146        model.Owner("the_owner");
147        model.Name("the_name");
148        localRepository.CopyTo(model, remote1Repository)
149        remote1Repository.CopyTo(model, localRepository)
150    * "LocalRepository" and "RemoteRepository" should implement this interface.
151    (Most of the pieces are there, we just need to refactor the code a bit).
152
153* Think about how to detect when new versions of remote models have been uploaded.
154    * Idea of a hash.
155
156* Add ignition fuel command line utilities for:
157    * list
158    * detail
159    * create
160    * delete
161    * copyTo
162
163* How to test the client library:
164    * Directly against the real backend (staging?)
165    * Clone, and compile a local backend?
166    * Mocking the backend has the problem of not being in sync with the real backend and missing potential issues.
167