From c996dca5ca353a86bf762245f82a0ea4a3d71875 Mon Sep 17 00:00:00 2001 From: John-Paul Navarro Date: Fri, 2 Apr 2021 06:23:41 -0500 Subject: [PATCH] See CHANGELOG tag-1.1-20210402 --- CHANGELOG | 3 +++ bin/route_resource_v3.py | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 83c9059..42b755e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +tag-1.1-20210402 JP + - Improve RDR Organization Name and Description + tag-1.1-20210326b JP - Replaced hardcoded RSP URNs with corresponding RDR URNs diff --git a/bin/route_resource_v3.py b/bin/route_resource_v3.py index cf1c39e..5255a45 100755 --- a/bin/route_resource_v3.py +++ b/bin/route_resource_v3.py @@ -1566,14 +1566,30 @@ def Write_RDR_Providers(self, content, contype, config): # -------------------------------------------- # update ResourceV3 (standard) table try: + Name = orgs['organization_name'] + if orgs.get('organization_abbreviation'): + Name += ' ({})'.format(orgs['organization_abbreviation']) ShortDescription = None - Description = Format_Description(orgs.get('organization_name')) + Description = Format_Description(Name) + Location = None + for locfld in ['city', 'state', 'country']: + if orgs.get(locfld): + if not Location: + Location = '- Location: {}'.format(orgs.get(locfld)) + else: + Location += ', {}'.format(orgs.get(locfld)) + Description.blank_line() + if Location: + Description.append(Location) + if orgs.get('organization_url'): + Description.append('- Organization URL: {}'.format(orgs.get('organization_url'))) + resource = ResourceV3( ID = myGLOBALURN, Affiliation = self.Affiliation, LocalID = str(orgs['organization_id']), QualityLevel = 'Production', - Name = orgs['organization_name'], + Name = Name, ResourceGroup = myRESGROUP, Type = myRESTYPE, ShortDescription = ShortDescription,