create_ns function of nfvo_plugin has unused variable

Bug #1761425 reported by Trinh Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Invalid
Low
Unassigned

Bug Description

The create_ns function of /opt/stack/tacker/tacker/nfvo/nfvo_plugin.py has some unsued parts:

...
        ns_info = ns['ns']
        name = ns_info['name']

        LOG.debug('\n\n==create_ns ns: %s==\n\n', ns)

        if ns_info.get('nsd_template'):
            nsd_name = utils.generate_resource_name(name, 'inline')
            nsd = {'nsd': {
                'attributes': {'nsd': ns_info['nsd_template']},
                'description': ns_info['description'],
                'name': nsd_name,
                'template_source': 'inline',
                'tenant_id': ns_info['tenant_id']}}
            ns_info['nsd_id'] = self.create_nsd(context, nsd).get('id')
...

After that ns_info is never called again, only ns['ns'].

Revision history for this message
Trinh Nguyen (dangtrinhnt) wrote :

Look like it's the same in create_vnffg()

        vnffg_info = vnffg['vnffg']
        name = vnffg_info['name']

        if vnffg_info.get('vnffgd_template'):
            vnffgd_name = utils.generate_resource_name(name, 'inline')
            vnffgd = {'vnffgd': {'tenant_id': vnffg_info['tenant_id'],
                                 'name': vnffgd_name,
                                 'template': {
                                     'vnffgd': vnffg_info['vnffgd_template']},
                                 'template_source': 'inline',
                                 'description': vnffg_info['description']}}
            vnffg_info['vnffgd_id'] = \
                self.create_vnffgd(context, vnffgd).get('id')

After this, vnffg_infor is never used.

Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Hiroo Kitamura (h-kitamura) wrote :

When I checked the latest source code, it seems that ns_info is being used as follows.
Therefore, I will change the status of this bug.

https://opendev.org/openstack/tacker/src/branch/master/tacker/nfvo/nfvo_plugin.py#L740

Changed in tacker:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.