Replies: 1 comment
-
As a first step, or a prototype/proof-of-concept, you could add Custom Fields to Tenancy > Contact, containing the uuid and the structured address fields. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking at creating an Export Template of Contact information to a vCard file for easy import into many different cross-platform Contact applications.
I'm no expert in vCards, but I have looked at the "vCard Format Specification" described in RFC-6350.
I think that 2 changes could improve export (and import) to and from vCards significantly.
"uuid":
field fortenancy/contacts
in the URN namespace defined in RFC4122 created (with a unique UID) upon creation. Used for theUID
field described in section-6.7.6 to uniquely identify a vCard."address":
field (like a JSON object) for all the components describing an address. Used for theADR
field described in section-6.3.1. The values can be empty.A simple Export Template of all Contacts (
Content Type: tenancy | contact
,MIME Type: text/vcard
,File Extension: vcf
as an Attachment) tested on NetBox v3.2.9:With the
"address":
field currently formatet like this:It's really hard (guessing required) to create a parser in Jinja that correctly handles how a user might type in an address. It doesn't get easier when you have addresses in multiple countries (with different formats). The
ADR
must have them is the format below (all the fields separated with;
) and in that order:Some countries don't use
REGION
andPOSTAL
might be written beforeCITY
. If a field is empty you still need the;
separator. So a line might look something like:;;STREET;CITY;;POSTAL;
For better support with multiple different Contact applications you generally want to keep
PO_BOX
andEXT_ADDR
empty - so your ADR line should probably start withADR:;;
I'm not sure how much work the changes above would require and wondered if anybody else would see any value in better support for vCard import and export of Contacts to and from NetBox?
Beta Was this translation helpful? Give feedback.
All reactions