-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Enable service offerings to be scoped to domain(s) and zone(s) #3248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable service offerings to be scoped to domain(s) and zone(s) #3248
Conversation
ea163b8 to
3b9e2b5
Compare
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✖centos7 ✖debian. JID-2662 |
borisstoyanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be some build issues here, could you please investigate @shwstppr
3f03aed to
30d5f52
Compare
30d5f52 to
46e1cc6
Compare
| entityType = ZoneResponse.class, | ||
| description = "id of zone disk offering is associated with", | ||
| since = "4.13") | ||
| private Long zoneId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only for a zone, not for domains or multiple zones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DaanHoogland List APIs are changed only for a single zone. Multiple domains and zones can be specified with create or update APIs.
Single zone in list API is needed as when we create storage, network or deploy VM we select or specify a particular zone. Therefore we need to query those offerings which are available for that particular zone or domain(through calling account).
| entityType = ZoneResponse.class, | ||
| description = "id of zone disk offering is associated with", | ||
| since = "4.13") | ||
| private Long zoneId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, only for a single zone, not domains?
| private Boolean supportsPublicAccess; | ||
|
|
||
| @SerializedName(ApiConstants.DOMAIN_ID) | ||
| @Param(description = "the domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
said to be multiple but the getter does not seem to facilitate this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple domains are supported with a comma-separated list of domain IDs. This is done to maintain backward compatibility and consistency. ServiceOfferingResponse and DiskOfferingResponse already had a domainId parameter and if an array of IDs would have been used instead of comma-separated string it might have broken automation scripts for some.
|
@blueorangutan package |
|
@PaulAngus a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2720 |
|
@blueorangutan matrix |
|
@shwstppr can you fix the conflicts? |
Allows creating storage offerings associated with particular domain(s) and zone(s). In create disk/storage offfering form UI, a mult-select control has been addded to select desired zone(s) and domain select element has been made multi-select. createDiskOffering API has been modified to allow passing list of domain and zone IDs with keys domainids and zoneids respectively. These lists are stored in DB in cloud.disk_offering_details table with 'domainids' and 'zoneids' key as string of comma separated list of IDs. Response for create, update and list disk offering APIs will return domainids, domainnames, zoneids and zonenames in details object of offering. listDiskOfferings API has been modified to allow passing zoneid to return only offerings which are associated with the zone. Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-107 |
|
Let's repackage one of the UI issues was fixed recently on master. |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-121 |
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-123 |
borisstoyanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, reviewed the latest fixes
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-154)
|
anuragaw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Ping @PaulAngus @borisstoyanov |
|
LGTM based on manual testing. |
PaulAngus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM based on manual testing
|
Was the branch merged @PaulAngus @shwstppr? I'll request again that PRs be squash+merged and branches not be merged as is to avoid fragmentation of commits wrt a feature or a bug. |
Can we revert and squash-merge again @rhtyd? |
|
No need. |

Description
Problem: Service, disk, network, and VPC offerings cannot be linked to specified multiple domain(s) and zone(s).
Root cause: Service, disk, network, and VPC offerings are independent of zones. Service and disk offerings can be linked only to a single domain/sub-domain
Solution: Service, disk, network, and VPC offerings will be allowed to be created with specified domain(s) and zone(s). Offerings linked with multiple domains and zones can be created both with UI and API. Refactored create offering API to allow the passing list of domain and zone IDs with
domainidandzoneidparameter respectively. UI has been refactored to allow selecting multiple domains and zones while creating offering using multi-select elements. When the list of passed domains contain both parent and child domains, the offering will be created for the parent domain. Offering details will now show a list of linked domains and zones as a comma-separated list of names. Linked domains and zones will be stored in thecloud.*_offering_detailstable in the database as a separate row for each domain and zone ID with key domainid and zoneid respectively.Linked domain(s) and zone(s) for an offering (service, disk, network, or VPC) can be updated using update*Offering API. To make a domain-specific offering public by root admin,
domainid=publiccan be passed in the API call. To make a zone specific offering available for all zones by root admin,zoneid=allcan be passed in the API call. Update Offering Access action has been added to the offerings page in UI which will allow updating linked domain(s) and zone(s) for an offering.Domain-admins can update compute and disk offerings. However, they can not change zones for the offerings specified for their domain or subdomains. They cannot change name, display text, sort-key for offerings specified for their domains/subdomains and also other domains which are not child domain for them. They can chnage domains(within their subdomains) for the offerings specified for their domains/subdomains.
Types of changes
Screenshots (if appropriate):
Updated create offering forms




Updated disk offering details with domains and zones,

Update Offering Access UI


Cloudmonkey API call

Update offering API call
How Has This Been Tested?
From UI and cmk