Skip to content
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

Add Vdc Vm compute policies functionality #334

Merged
merged 28 commits into from
Oct 1, 2020

Conversation

vbauzys
Copy link
Contributor

@vbauzys vbauzys commented Sep 3, 2020

Functionality needed for VM sizing policy.

New functionality:

  • org.GetVdcComputePolicyById, adminOrg.GetVdcComputePolicyById
  • org.GetAllVdcComputePolicies, adminOrg.GetAllVdcComputePolicies
  • adminOrg.CreateVdcComputePolicy, vdcComputePolicy.Update, vdcComputePolicy.Delete
  • adminVdc.GetAllAssignedVdcComputePolicies
  • adminVdc.SetAssignedComputePolicies
  • vapp.AddNewVMWithComputePolicy
  • vm.UpdateComputePolicyAsync and vm.UpdateComputePolicy

VDC compute policy can be created in 32 version but getting doesn't work well on 32 version. Also doesn't have UI for that. So overall limitation is 33 API version (All functionality works in from VCD 10.0+)

@vbauzys vbauzys marked this pull request as ready for review September 3, 2020 14:10
@vbauzys vbauzys requested review from dataclouder, Didainius and lvirbalas and removed request for dataclouder September 3, 2020 14:10
@vbauzys vbauzys self-assigned this Sep 3, 2020
Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass one

util.Logger.Printf("[TRACE] Set Compute Policies started")

if !vdc.client.IsSysAdmin {
return nil, fmt.Errorf("functionality requires system administrator privileges")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, suggesting to capitalize:

Suggested change
return nil, fmt.Errorf("functionality requires system administrator privileges")
return nil, fmt.Errorf("functionality requires System Administrator privileges")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed in all project files

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after the changes - System Administratorprivileges

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vbauzys vbauzys merged commit e2e8880 into vmware:master Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants