Skip to content

dynamic fq_name setting based on the parent obj and request json #81

@cijohnson

Description

@cijohnson

Current implementation of vnc api client library, frames fq_name of the object based on the following criteria

  1. parent obj
  2. fq_name set in request body
  3. No parent

we need to do similar thing in go-api-server as well.

code snippet:

if parent_obj:
self.parent_type = parent_obj._type
# copy parent's fq_name
self.fq_name = list(parent_obj.fq_name)
self.fq_name.append(name)
elif kwargs_parent_type and kwargs_fq_name:
self.parent_type = kwargs_parent_type
self.fq_name = kwargs_fq_name
else: # No parent obj specified
self.parent_type = 'project'
self.fq_name = [u'default-domain', u'default-project']
self.fq_name.append(name)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions