Comments (12)
Hi,
From reading the code, it seems that I didn't manage the case where you only specify the datacenter.
You should also specify the rack
I'll see if I can manage a PR to make your case work
from netbox-agent.
Thanks for your help. In my situation, I have hundreds of servers already deployed and I currently don't have a good way of managing elevations ( hence netbox). My plan was to get all the gear in netbox then update their locations afterwards.
from netbox-agent.
Ok :)
I understand the workflow and make sure it's supported
from netbox-agent.
would you be able to test the #143 branch and let me know if it's ok for you ?
from netbox-agent.
Thanks for the quick turn around!!.still getting an error but not the same error
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/rjones/netbox-agent/netbox_agent/cli.py", line 48, in <module>
main()
File "/home/rjones/netbox-agent/netbox_agent/cli.py", line 44, in main
return run(config)
File "/home/rjones/netbox-agent/netbox_agent/cli.py", line 39, in run
server.netbox_create_or_update(config)
File "/home/rjones/netbox-agent/netbox_agent/server.py", line 271, in netbox_create_or_update
self._netbox_create_server(datacenter, rack)
File "/home/rjones/netbox-agent/netbox_agent/server.py", line 185, in _netbox_create_server
device_role = get_device_role('Server')
File "/home/rjones/netbox-agent/netbox_agent/server.py", line 20, in get_device_role
raise Exception('DeviceRole "{}" does not exist, please create it'.format(role))
Exception: DeviceRole "Server" does not exist, please create it
from netbox-agent.
the agent assumes that you have an existing DeviceRole
called Server to be assigned to the server created or updated
from netbox-agent.
Makes sense, is there a way to override this in the agent?
from netbox-agent.
there's a PR in #110 that I didn't merge so I guess it's time
from netbox-agent.
Thanks that would be awesome. I'm doing this manually to start but the plan is to wrap this all up with ansible. I'll Define the roles in the inventory.
from netbox-agent.
Issue has been closed automatically, but I've also merged the role support that you can use by passing --device.chassis_role my_chassis_role --device.blade_role my_blade_role
Let me know if it works for you
From the tests I've done everything's ok :)
from netbox-agent.
I pulled the changes. I'm still having issues just different issues. I think maybe I just don't quite understand the info I need to provide.
netbox-agent]$ python3 -m netbox_agent.cli -c ../agent.yml --register --device.chassis_role docker-host
ERROR:root:Specificing a datacenter (Site) is mandatory in Netbox
from netbox-agent.
I made the datacenter mandatory to create your device, you must specify the datacenter like:
datacenter_location:
driver: "cmd:echo my-dc"
regex: "(.*)"
from netbox-agent.
Related Issues (20)
- error on IPMI interface HOT 2
- Several fields on the cable API serializers have been altered or removed to support multiple-object cable terminations HOT 4
- Interfaces in virtual machines need to use different endpoint HOT 3
- the script cannot create an ip address HOT 2
- how to integrate automatic scanning/discovery in HP enclosures:blades ? HOT 1
- Project dependencies may have API risk issues HOT 3
- netbox 3.3.9 HOT 3
- A brief description of the fields in netbox_agent.yaml that netbox-agent can work with. HOT 2
- serial: This field may not be null. (on disks?) HOT 1
- detailed project dependencies needed. HOT 1
- Problem adding interfaces HOT 1
- lldm.py return error: current_dict[final] = value, TypeError HOT 3
- (config.py): no verify ssl doesnt parse with python<3.9 HOT 2
- Error when querying VLANs that are duplicated across datacenters | ValueError: get() returned more than one result HOT 1
- AttributeError: 'NoneType' object has no attribute 'id' HOT 2
- [Feature] Create Site if not exists
- Error installing HOT 1
- inventory remote machines HOT 1
- Supermicro only baseboard serial number set
- netbox_agent==0.7.2 not available on pip HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netbox-agent.