Skip to content

Commit

Permalink
See CHANGELOG tag-1.1-20210402
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnavarro committed Apr 2, 2021
1 parent 860931d commit c996dca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 18 additions & 2 deletions bin/route_resource_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c996dca

Please sign in to comment.