Skip to content

listNetworkOfferings api does not handle phyiscal network tags correctly #6747

@samapraku

Description

@samapraku
ISSUE TYPE
  • Bug Report
COMPONENT NAME
API, UI
CLOUDSTACK VERSION
4.17.0.1
CONFIGURATION

Advanced Network

OS / ENVIRONMENT

Ubuntu 20.04

SUMMARY

listNetworkOfferings api endpoint does not handle physical network tags correctly.

When creating a new Shared Guest network and a Physical network is selected, which has tags, the network offerings list in the dropdown is always empty

However, if the selected physical network does not have tags, the network offerings are populated

STEPS TO REPRODUCE

Create a Physical network with and without tags

In Networks -> Guest Network -> Add Network -> Shared

If the physical network has tags, the network offering dropdown is always empty.

Or make a listNetworkOfferings api request and pass a zoneid that has physical network that has no tags.

Issue likely caused by this line:

if (isTagged != null) {
            if (isTagged) {
                sc.addAnd("tags", SearchCriteria.Op.NNULL);
            } else {
                sc.addAnd("tags", SearchCriteria.Op.NULL);
            }
        }
EXPECTED RESULTS
When a physical network has tags, listNetworkOfferings should take the tags into account
ACTUAL RESULTS

listNetworkOfferings always return empty when a physical network has tags


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions