5
5
[ ![ Code Climate] ( https://codeclimate.com/github/ninech/netbox-client-ruby/badges/gpa.svg )] ( https://codeclimate.com/github/ninech/netbox-client-ruby )
6
6
7
7
This is a gem to pragmatically access your [ Netbox instance] ( https://github.com/digitalocean/netbox )
8
- via it's API from Ruby. This gem is currently only compatible with Netbox v2.
8
+ via it's API from Ruby. This gem is currently only compatible with Netbox v2.4 or newer.
9
9
10
10
## Installation
11
11
@@ -134,6 +134,11 @@ NetboxClientRuby.secrets.session_key = persisted_session_key
134
134
Not all objects which the Netbox API exposes are currently implemented. Implementing new objects
135
135
[ is trivial] ( https://github.com/ninech/netbox-client-ruby/commit/e3cee19d21a8a6ce480d7c03d23d7c3fbc92417a ) , though.
136
136
137
+ * Circuits:
138
+ * Circuits
139
+ * Circuit Types
140
+ * Circuit Terminations
141
+ * Providers
137
142
* DCIM:
138
143
* Devices
139
144
* Device Roles
@@ -146,6 +151,7 @@ Not all objects which the Netbox API exposes are currently implemented. Implemen
146
151
* Racks
147
152
* Rack Groups
148
153
* Rack Roles
154
+ * Rack Reservations
149
155
* Regions
150
156
* Sites
151
157
* IPAM:
@@ -178,11 +184,33 @@ if it was added in the meantime without the list above having been updated.
178
184
179
185
## Development
180
186
181
- After checking out the repo, run ` bin/setup ` to install dependencies. Then, run ` rake spec ` to run the tests.
182
- You can also run ` bin/console ` for an interactive prompt that will allow you to experiment .
187
+ After checking out the repo, run ` bin/setup ` to install dependencies.
188
+ Then, run ` rake spec ` to run the tests .
183
189
184
190
To install this gem onto your local machine, run ` bundle exec rake install ` .
185
191
192
+ To experiment interactively, fire up the Netbox Docker container by running ` docker-compose up -d ` .
193
+ Then, run ` bin/console ` for an interactive prompt that will allow you to experiment against your local Netbox.
194
+
195
+ ### Load Development Data
196
+
197
+ To simplify development, e.g. via the ` bin/console ` described above, there is a very complete sample set of Netbox data readily available.
198
+ You can use it to query almost every object and relation in Netbox.
199
+
200
+ ``` bash
201
+ cat dump.sql | docker-compose exec postgres psql -U postgres
202
+ ```
203
+
204
+ ### Dump Development from Database
205
+
206
+ Should you want to export the current set of data, use the command below.
207
+
208
+ ``` bash
209
+ docker-compose exec postgres pg_dump -U netbox --exclude-table-data=extras_objectchange -Cc netbox > dump.sql
210
+ ```
211
+
212
+ (Remove ` --exclude-table-data=extras_objectchange ` from the command if you want to retain the history!)
213
+
186
214
## Contributing
187
215
188
216
Bug reports and pull requests are very welcome [ on GitHub] ( https://github.com/ninech/netbox-client-ruby ) .
0 commit comments