Commit Graph

84 Commits

Author SHA1 Message Date
ricardo.bartels@telekom.de
1dc122bcad improves way to find existing cluster in NetBox #220 2022-08-26 16:56:11 +02:00
ricardo.bartels@telekom.de
a16bc1b8e5 avoids updating slug if a slug is already present. #206 2022-08-25 09:11:03 +02:00
ricardo.bartels@telekom.de
a68a9f0ae1 adjusts the name and slug length for different NB models #214 2022-08-25 08:30:13 +02:00
ricardo.bartels@telekom.de
7da771a204 fixes removal of orphan status for IP address of offline VMs #192 2022-08-24 21:34:08 +02:00
ricardo.bartels@telekom.de
7a53ff0df3 add option to print secondory key if present to NB objects 2022-06-29 22:21:24 +02:00
ricardo.bartels@telekom.de
9cfa9b192e adds config option 'disable_vlan_sync' to vmware source
refs: #205
2022-06-27 11:16:34 +02:00
ricardo.bartels@telekom.de
22e23c25ac adds config option 'set_source_name_as_cluster_group' to vcenter source #171 2022-06-17 23:32:52 +02:00
ricardo.bartels@telekom.de
3e0532a25b adds support multiple cluster with same name
refs: #197
refs: #119
refs: #195
2022-06-09 11:07:50 +02:00
ricardo.bartels@telekom.de
99a10ac1af adds support for proxies and NetBox client certs #140 2022-05-24 08:24:33 +02:00
ricardo.bartels@telekom.de
71c97dee1b sanitize manufacturer for all objects #145 2022-05-20 15:17:31 +02:00
ricardo.bartels@telekom.de
c4e0e77726 fixes IP addresses marked as orphan when VM is turned off #192 2022-05-20 11:33:09 +02:00
ricardo.bartels@telekom.de
3d52e3950c adds arbitrary object attributes as custom fields to objects in NetBox
refs: #170
refs: #191
2022-05-19 17:31:06 +02:00
ricardo.bartels@telekom.de
72f6ee2904 adds config option 'ignore_unknown_source_object_pruning' #176 2022-05-18 15:09:33 +02:00
ricardo.bartels@telekom.de
077d0cd672 handles IP address objects better to support FHRP groups better
refs: #185
refs: #174
2022-05-03 14:33:23 +02:00
ricardo.bartels@telekom.de
def19faabe fixes issue with wrong vm primary ip object type #172 2022-04-09 20:15:31 +02:00
ricardo.bartels@telekom.de
a139c7ec42 fixes issue with tags assigned to NB objects which were not part of the data model
refs: #120
2022-04-08 00:15:00 +02:00
ricardo.bartels@telekom.de
c0e1895382 give hint about device missing it's name #162 2022-03-29 21:33:29 +02:00
ricardo.bartels@telekom.de
6f8b9c0ccc adds an error message if a tag was not resolved #120 2022-03-29 16:56:53 +02:00
ricardo.bartels@telekom.de
6181795a3c allow to ignore objects which don't have a primary key set (devices) #162 2022-03-29 14:44:15 +02:00
ricardo.bartels@telekom.de
51dcd7a45d adds 'ipam.fhrpgroup' to IP addresses permitted 'assigned_object_type's #137 2022-01-31 15:10:14 +01:00
ricardo.bartels@telekom.de
a9f25a6307 prepare release v1.2.2 2022-01-27 18:35:58 +01:00
ricardo.bartels@telekom.de
4410d6db8c fixes issue with unserolved objects in first run of NetBox sync #120
refs: #120
2022-01-25 19:25:56 +01:00
ricardo.bartels@telekom.de
120f6757ad Adds support to import interface WWN from redfish source
refs: #121
2021-12-21 11:15:51 +01:00
ricardo.bartels@telekom.de
ce5eb04ff8 adds syncing of vCenter Custom Attributes #114 2021-10-31 14:29:24 +01:00
ricardo.bartels@telekom.de
efced66ec5 removes comments about circular dependencies #62 2021-10-26 14:27:10 +02:00
ricardo.bartels@telekom.de
b358a833af Enhances README to Cleary use of multiple sources
* fixes typos
* adds version and date to log on each run

refs: #109
2021-10-22 11:20:10 +02:00
ricardo.bartels@telekom.de
a87904c626 Merge remote-tracking branch 'obestwalter/main' into development
refs: #61
2021-10-21 23:30:30 +02:00
ricardo.bartels@telekom.de
5a00cc5c3c adds "cluster_tenant_relation" and "cluster_tag_relation" to vmware source #110 2021-10-21 00:02:39 +02:00
ricardo.bartels@telekom.de
b3f4928b9d Merge branch 'fix/skip-items-missing-primary-key-104' into development 2021-10-18 15:25:20 +02:00
ricardo.bartels@telekom.de
8a1d65aaea Merge branch 'fix/manufacturer-slug-issue' into development 2021-10-18 15:22:53 +02:00
ricardo.bartels@telekom.de
151ddf1bd0 adds feature to sync tags from vCenter to NetBox
refs: #65
2021-10-18 15:16:10 +02:00
ricardo.bartels@telekom.de
db5eb64055 enhances logic of checkig if primary object key is present
Refs: #104
2021-10-16 08:16:29 +02:00
ricardo.bartels@telekom.de
20aa45b790 reduce DEBUG and DEBUG2 logging #97 2021-10-15 22:26:13 +02:00
ricardo.bartels@telekom.de
627e3c5215 adds check if object data contains primary key before adding #104
refs: #104
2021-10-15 21:25:16 +02:00
ricardo.bartels@telekom.de
48ab641d06 adds finding objects by slug name to match first when searching for objects
refs: #79
2021-10-15 15:10:10 +02:00
ricardo.bartels@telekom.de
f2aeca0a7e adds ":" to characters in format_slug to substitute with "-" 2021-10-13 11:45:50 +02:00
ricardo.bartels@telekom.de
7d600bd5b1 fixes issue with manufacterer slug name
refs: #99
refs: #79
2021-09-30 23:10:21 +02:00
ricardo.bartels@telekom.de
b775edbb58 adds class and methods descriptions to newly added objects
refs: #91
2021-09-24 17:42:53 +02:00
ricardo.bartels@telekom.de
cbed134951 WIP: enhances the data enrichment on inventory items 2021-09-23 11:15:10 +02:00
ricardo.bartels@telekom.de
6a5000cfbd adds network interface speed detection
refs: #91
2021-09-22 23:20:59 +02:00
ricardo.bartels@telekom.de
716ee29446 WIP: adds ip address support for check_redfish source
refs: #91
2021-09-17 16:18:06 +02:00
ricardo.bartels@telekom.de
ffff4904c7 Merge branch 'main' into feature/source-check-redfish 2021-09-14 18:25:45 +02:00
ricardo.bartels@telekom.de
6268a84cbd fixes error with shadowed name 'version' in NetBoxHandler 2021-09-14 18:21:57 +02:00
ricardo.bartels@telekom.de
f12dad5a65 WIP: enhances redfish import and deletes incorrect inv items
refs: #91
2021-09-14 18:17:00 +02:00
ricardo.bartels@telekom.de
34d11017ac WIP: adds more custom fields for a better data representation 2021-09-14 18:16:52 +02:00
ricardo.bartels@telekom.de
37715b2fa7 WIP: adds new source check_redfish #91
refs: #91
refs: #79
2021-09-14 18:16:43 +02:00
ricardo.bartels@telekom.de
9dea35655c add content type headers to netbox requests to stay compliant 2021-09-14 12:49:19 +02:00
Oliver Bestwalter
7ab8e31117 workaround for problem of undefined objects
There is a circular dependency between class objects that are needed during class creation. There is no way to solve this during module import when the class objects are created. An easy way to fix this is to defer the the creation of the data_model dict to a time where all class objects are already created. Her it is deferred to the point in time, when an object of that class is created, simply making data_model an instance object.

As long as not too many objects are created this is the easiest way to ensure that all objects are already created. The fact that there is now one data_model per instance, instead of one per class will only start to be a problem, if this code needs to adhere to strict memory restrictions or millions of objects are created. Then there are ways to make sure that only the first instance that is created, initializes the data_model on the class object and later initializations have no effect. As that is "cleverer" code though, this should only be done if really necessary.
2021-05-12 16:10:03 +02:00
Oliver Bestwalter
af0d1a5636 clarify intent and make static code analysis happy
Add the mandatory class attributes expected of all subclasses to the parent class. This clarifies the intent that they must be set and which type they have by assigning a falsy object of the correct type. A check on instantiation makes sure then, that all values are set now. There are other ways of doing that, but this is the simplest in the current implementation.

Adding an assert isinstance(...) doubles as a sanity check and a help for the IDE to infer the type of an object (therefore append not being flagged as an undefined method on resolved_object_list anymore).
2021-05-12 13:57:20 +02:00
Ricardo Bartels
d6bd331e2a fixes issue with with last commit if current value is None
refs: #58
refs: #59
2021-04-26 09:44:21 +02:00