Skip to content

Conversation

harikrishna-patnala
Copy link
Contributor

@harikrishna-patnala harikrishna-patnala commented Sep 11, 2025

Description

This PR adds a new extension and script to support MaaS (https://canonical.com/maas) in CloudStack.

Doc PR : apache/cloudstack-documentation#561

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.39%. Comparing base (8089d32) to head (86d544e).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11613      +/-   ##
============================================
+ Coverage     17.36%   17.39%   +0.03%     
- Complexity    15245    15285      +40     
============================================
  Files          5888     5888              
  Lines        525831   526130     +299     
  Branches      64183    64232      +49     
============================================
+ Hits          91298    91542     +244     
- Misses       424227   424255      +28     
- Partials      10306    10333      +27     
Flag Coverage Δ
uitests 3.62% <ø> (-0.01%) ⬇️
unittests 18.44% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan package

@harikrishna-patnala harikrishna-patnala changed the title Adding Extension for MaaS integration in CloudStack Added Extension for MaaS integration in CloudStack Sep 11, 2025
@blueorangutan
Copy link

@harikrishna-patnala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14951

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@harikrishna-patnala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15000

@DaanHoogland
Copy link
Contributor

@harikrishna-patnala shouldn’t this be externalised and added on request at configuration/runtime instead of in the main repo? I know we did some initial integration within the repo, I just wonder if we should continue like that? cc @rohityadavcloud

@@ -0,0 +1,213 @@
#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to add +x permissions to the file like hyperv.py and proxmox.sh. I don't recall the exact reason, but it was needed for some packaging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added, thank you

Comment on lines +175 to +180
if state == "on":
mapped = "PowerOn"
elif state == "off":
mapped = "PowerOff"
else:
mapped = "PowerUnknown"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if it matters that much, but other extensions are using poweron, poweroff and unknown.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/shapeblue/cloudstack/blob/cca8b2fef9016bc04cde10f2f2ef4bf6f345155e/plugins/hypervisors/external/src/main/java/org/apache/cloudstack/hypervisor/external/provisioner/ExternalPathPayloadProvisioner.java#L628-L638

We are comparing by ignoring case @Abhisar, so this should be fine. Any thing other than PowerOn and PowerOff is considered as PowerUnknown state, so unknown or powerunknown anything works.

@harikrishna-patnala
Copy link
Contributor Author

@harikrishna-patnala shouldn’t this be externalised and added on request at configuration/runtime instead of in the main repo? I know we did some initial integration within the repo, I just wonder if we should continue like that? cc @rohityadavcloud

Yeah we need not to continue adding like this @DaanHoogland but this will stand as a good example for baremetal provisionings.

Copy link
Collaborator

@abh1sar abh1sar left a comment

Choose a reason for hiding this comment

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

Code LGTM.
Didn't test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants