cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

API: list network offerings doesn't work with multiple domains

Open vdombrovski opened this issue 2 years ago • 4 comments

ISSUE TYPE
  • Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.17.0.1
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY
STEPS TO REPRODUCE

Make sure you have 2 domains (called here X and Y)

cmk create networkoffering domainid=X,Y type=shared [...] (just fill in the required args)
cmk list networkofferings domainid=X type=shared
EXPECTED RESULTS
Should return the created networkoffering
ACTUAL RESULTS
Nothing is returned

vdombrovski avatar Sep 16 '22 11:09 vdombrovski

@vdombrovski Have you enabled the newly created offering? And there is no type parameter for listNetworkOfferings API

shwstppr avatar Sep 16 '22 11:09 shwstppr

Yes, the offering is enabled. And please replace type by guestiptype, small typo when creating a ticket (not that it is that relevant to the issue).

vdombrovski avatar Sep 16 '22 13:09 vdombrovski

Here, maybe a more detailed example will help. Obviously this also affects functionality inside the UI on the add network page; it won't let you choose a network offering whenever you select a "domain" scope because it can't list networkofferings that belong to multiple domains.

(default)  > list networkofferings guestiptype=shared name=mynetwork
count = 1
networkoffering:
specifyvlan = true
conservemode = true
forvpc = false
created = 2022-08-30T11:56:14+0200
id = d507795b-2c7b-466b-8996-211a99706daf
tags = main
zone = Z1,Z2
egressdefaultpolicy = true
supportspublicaccess = false
serviceofferingid = 2d881ac5-3526-412a-ad19-8a5444d56e58
name = mynetwork
availability = Optional
state = Enabled
isdefault = false
domainid = 53808bfe-c452-4739-bfdd-febbf78cc504,8fbd3ff3-d367-4812-a256-1d918e3e9b8d
zoneid = 5f924d92-adb9-4907-9bce-0166b80362b2,f88034f2-d4fb-4014-8c14-bb5ac386575e
guestiptype = Shared
supportsstrechedl2subnet = false
traffictype = Guest
specifyipranges = true
networkrate = 2000
service = []
displaytext = mynetwork
domain = XXXXXXXXXXX
ispersistent = false
internetprotocol = IPv4
hasannotations = false

(default)  > list networkofferings guestiptype=shared name=mynetwork domainid=53808bfe-c452-4739-bfdd-febbf78cc504

vdombrovski avatar Sep 16 '22 13:09 vdombrovski

@vdombrovski thanks. I was able to reproduce it. Will create a fix soon

shwstppr avatar Sep 16 '22 13:09 shwstppr