-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Extensions Framework & Orchestrate Anything #9752
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
Open
harikrishna-patnala
wants to merge
181
commits into
apache:main
Choose a base branch
from
shapeblue:ExternalDeploymentIntegration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+21,777
−1,065
Open
Changes from 31 commits
Commits
Show all changes
181 commits
Select commit
Hold shift + click to select a range
3d9a92a
Introducing External Framework and Orchestrate Anything
harikrishna-patnala 790ae86
Added since parameter
harikrishna-patnala 2f9d04c
fix logger
harikrishna-patnala 266f101
Fix tests
harikrishna-patnala 6576152
License check
harikrishna-patnala 51ea49a
Rename Folder
harikrishna-patnala 4681493
recent commit for proxmax, I'll have edit this commit afterwards
harikrishna-patnala 9c42b55
Merge this into FR04
harikrishna-patnala fc25c0f
working env
harikrishna-patnala 7d140c1
Extension framework
harikrishna-patnala f0f6779
Listing API
harikrishna-patnala 38bb8ba
Renames and adding path
harikrishna-patnala 7e58612
New changes
harikrishna-patnala 32fc7f8
Fix Map and String
harikrishna-patnala 73ad1bf
License
harikrishna-patnala f6ab456
Unit test fix
harikrishna-patnala 8b1ed02
Lint error
harikrishna-patnala 50de0ef
gen doc issue
harikrishna-patnala 659e816
Fix sql
harikrishna-patnala 6aedf94
import issue
harikrishna-patnala f517c68
Script Fixes
harikrishna-patnala ed9dff1
Lint error
harikrishna-patnala a9cb4ad
response added
harikrishna-patnala c25e85c
Fix restart MS issue and method mappings in provisioner.sh
abh1sar e23bcb5
Introducing extensions and refactoring framework around it
harikrishna-patnala 5ba592e
gen_toc changes
harikrishna-patnala cff3c58
license
harikrishna-patnala 1422536
Merge remote-tracking branch 'apache/main' into ExternalDeploymentInt…
shwstppr 831e125
address review comments
shwstppr b4350d9
Fix a bug in finalizeReservation due to which External hypervisor was…
abh1sar bf4cc9e
refactor, configurable extension path
shwstppr 5dcb7aa
fix
shwstppr 0a16872
unnecessary
shwstppr 83f5cb8
changes
shwstppr f77a2e0
refactor check extensions dir
shwstppr 54c7073
use java code to prepare scripts
shwstppr d2132cb
Merge remote-tracking branch 'apache/main' into ExternalDeploymentInt…
shwstppr 3c0086c
backend custom actions changes
shwstppr 568a61e
Update plugins/hypervisors/external/src/main/java/org/apache/cloudsta…
shwstppr 069f8f2
UI fix for external details not sent correctly
abh1sar 0174a13
Fix some NPEs in External Hypervisor framework
abh1sar 65c3a41
base changes for checkhealthcommand handling
shwstppr 3553e23
Minor bug fixes in Custom Actions
abh1sar 26d6641
changes
shwstppr f5c4b06
fixes
shwstppr 06b9eb2
changes, extension ui, events, misc
shwstppr 0dbab7f
remove unimplemented comments tab for now
shwstppr d9d7de2
Merge remote-tracking branch 'apache/main' into ExternalDeploymentInt…
shwstppr 086f57e
changes - fix CRUD for ext abd custom actions; ui
shwstppr b8ff2da
changes
shwstppr 204bc28
fix
shwstppr 0a61f80
ui: fix add cluster
shwstppr 4c64106
ui: add refs in extension forms
shwstppr adc2a00
ui: fix cluster extension selection
shwstppr 321ff1e
ui: use detailinput in addhost form
shwstppr 44e8024
fix cluster extension register
shwstppr 09da11b
refactor
shwstppr 0e9291c
remove unused config validation
shwstppr af14f06
ui: fix details and parameters input
shwstppr ebe3e3e
ui: fix select labels in extension forms
shwstppr 7f80ffb
api: allow list custom actions for resource, run api change
shwstppr 82f88d9
ui: initial work for erun custom action
shwstppr f52bae2
changes
shwstppr 42c846c
additional commands
shwstppr 070051c
remove unused css
shwstppr 41703c2
pass json file instead
shwstppr 17eb17c
wip changes for extension sync
shwstppr fd917ab
fix stop vm
shwstppr 238bc19
entrypoint sync ui
shwstppr 08c6f0e
allow actual execution, fix script
shwstppr eafe9f1
fix addcusotmaction form
shwstppr 6bb936e
fix add host form css
shwstppr 51bd0b1
ui fixes
shwstppr 22fec2a
external planner to adhere arch, enabled clusters
shwstppr f0c5ecf
prepare entry-point on all MS
shwstppr cafb5a9
fixes, changes
shwstppr 0a35310
Merge remote-tracking branch 'apache/main' into ExternalDeploymentInt…
shwstppr 0beeeea
wip
shwstppr 34040e8
fix enable-disable
shwstppr 5210121
fix runaction wait
shwstppr 8296d48
ui: fix custom action add/update
shwstppr abc3943
wip: changes for feedback from demo
shwstppr 2605b51
ui fix
shwstppr 84f25c0
Merge remote-tracking branch 'apache/main' into ExternalDeploymentInt…
shwstppr dd5568c
Merge branch 'ExternalDeploymentIntegration' into feature-extensions-…
shwstppr d7c982f
ui: label fixes
shwstppr 945109b
wip: changes for writing files in a known dir
shwstppr 005bd8d
changes for host update, command handling, ui actions control
shwstppr 49318a8
changes for extension data directory
shwstppr b651d1c
refactor external details in JSON
shwstppr ef6960c
use default timeout
shwstppr 7e35bdb
ui: fix instance vol snapshot action
shwstppr 8d75f15
remove postprovisioning
shwstppr 28b1b34
change logging
shwstppr 94151b4
keep extensions dir in replace.properties and server.properties.in
abh1sar e04fba9
builtin extensions initial scripts
abh1sar 685674f
Update proxmox and hyperv scripts
abh1sar e623d1f
upgrade path to add builtin extensions
abh1sar 849a0e1
remove extensionsDirectory config
abh1sar 4868760
move sample extensions to scripts/vm/hypervisor/external
abh1sar d5e7670
Package sample extensions for el8
abh1sar 500d649
fix precommit failure in hyperv.py
abh1sar f1d63c0
revert copy to /etc/cloudstack
abh1sar b2f04ca
fix minor error in cloud.spec
abh1sar 6f4f4ec
refactor
shwstppr abae8af
ui fix
shwstppr 21bbae2
Merge branch 'feature-extensions-framework' into ExternalDeploymentIn…
shwstppr c83d184
refactor reading server.properties for extensions.file.path
shwstppr 751fed6
update column name in insert
shwstppr 6b1fbb5
typo
shwstppr 21bbc63
move extensions data dir under target
shwstppr e1de17a
do not prepare inbuilt extension
shwstppr 54d0acd
notification title
shwstppr 8c765e3
fixes
shwstppr c5a48cd
more fix
shwstppr 53c0f46
extensions directory label
shwstppr 3270afd
default location for extensions for dev env
abh1sar fe79499
rename class member for JSON
shwstppr 2bf6690
only return details that are meant for display
shwstppr 23b7d93
update extension fix
shwstppr f112ba9
wip: prepare updates VM in a generic way
shwstppr eee516c
changes
shwstppr e076a35
ui: show inbuilt tag in infocard
shwstppr c6dab62
ui: minor refactor
shwstppr d8bd9de
ui: fix console error
shwstppr 2c59171
ui: enable/disable as separate actions
shwstppr 378d64e
changes for orchestrator prepare using virtualmachineto
shwstppr 049f52c
changes for extension path, refactor
shwstppr f33a70a
missing license
shwstppr 3644cf4
Move extensions dir to top level. add property extensions.deployment.…
abh1sar 518503d
prepare only on first start
shwstppr d5f1d72
api,server,ui: changes for host, cluster extensionid
shwstppr 440aba0
minor refactor
shwstppr 34691b2
fixes
shwstppr 76b08a8
Merge remote-tracking branch 'apache/main' into ExternalDeploymentInt…
shwstppr 9b1ca52
refactor
shwstppr a46873d
fix merge issue
shwstppr a18682e
build fix
shwstppr 7ab2dc9
error handling and other improvements in proxmox.sh
abh1sar d205b84
enable destroy for external vms. get deployvm from vmto.
abh1sar 97c8d6f
insert parameters as HashMap into accessDetails in RunCustomAction
abh1sar 2590316
refactor, remove todo
shwstppr 840c1c1
refactor
shwstppr 5836a2d
handle upload todo, move common methods from HypervisorTemplateAdapter
shwstppr a11cdfb
Add Proxmox custom actions
abh1sar cb38175
fix pre-commit failure
abh1sar 85101ac
Error handling and custom actions for hyperv
abh1sar a89a493
Add ExternalEntryPointPayloadProvisionerTest
abh1sar 9e4376d
ExternalEntryPointPayloadProvisionerTest
abh1sar 8cbd28e
changes for vm state, external details
shwstppr 8b0bb7b
assorted changes
shwstppr 7af9868
test: add integration tests
shwstppr 77856d9
ui: fix extensions path
shwstppr 2e77980
fix build
shwstppr 534a56d
fix naming
shwstppr 5280666
add more tests
shwstppr c248627
more tests
shwstppr 1b92d4a
tests and minor refactor
shwstppr e56a591
build fix
shwstppr 69ede10
lint eof
shwstppr 6297a42
integration test fix
shwstppr 157e4a5
fix test fail with sudo permissions
shwstppr eb21fc8
fix
shwstppr f3b93e6
Remove prepare from proxmox and hyperv. Builtin exts disabled by defa…
abh1sar 54e844c
Added ExtensionCustomActionTest
abh1sar f7d0fe8
refactor to add more tests
shwstppr af19e3c
use InvalidParameterValueException, fix integration test failure
shwstppr 35f779b
list all for sync check
shwstppr 2951a67
minor fixes
shwstppr be99173
ui fixes
shwstppr cace6cd
Merge remote-tracking branch 'apache/main' into ExternalDeploymentInt…
shwstppr 67377c4
show run action result
shwstppr 10a90e8
extensions directory to be owned by cloud:cloud. Also added debian ru…
abh1sar 2abe27a
prepare changes
shwstppr 39c8b16
action name check
shwstppr ecd517c
get vmid in prepare for proxmox. nic related changes
abh1sar b54804c
multiple network support in hyperv
abh1sar b0bb7f4
test fixes
shwstppr b552c67
change default path sync check to 5mins
shwstppr b0c7e2e
use path instead of entrypoint, ui changes
shwstppr 3e86874
changes and refactor to fix command deserialization issue
shwstppr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//Licensed to the Apache Software Foundation (ASF) under one | ||
//or more contributor license agreements. See the NOTICE file | ||
//distributed with this work for additional information | ||
//regarding copyright ownership. The ASF licenses this file | ||
//to you under the Apache License, Version 2.0 (the | ||
//"License"); you may not use this file except in compliance | ||
//with the License. You may obtain a copy of the License at | ||
// | ||
//http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
//Unless required by applicable law or agreed to in writing, | ||
//software distributed under the License is distributed on an | ||
//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
//KIND, either express or implied. See the License for the | ||
//specific language governing permissions and limitations | ||
//under the License. | ||
|
||
package com.cloud.extension; | ||
|
||
import org.apache.cloudstack.api.Identity; | ||
import org.apache.cloudstack.api.InternalIdentity; | ||
|
||
public interface Extension extends InternalIdentity, Identity { | ||
String getScript(); | ||
} |
29 changes: 29 additions & 0 deletions
29
api/src/main/java/com/cloud/extension/ExtensionCustomAction.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//Licensed to the Apache Software Foundation (ASF) under one | ||
//or more contributor license agreements. See the NOTICE file | ||
//distributed with this work for additional information | ||
//regarding copyright ownership. The ASF licenses this file | ||
//to you under the Apache License, Version 2.0 (the | ||
//"License"); you may not use this file except in compliance | ||
//with the License. You may obtain a copy of the License at | ||
// | ||
//http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
//Unless required by applicable law or agreed to in writing, | ||
//software distributed under the License is distributed on an | ||
//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
//KIND, either express or implied. See the License for the | ||
//specific language governing permissions and limitations | ||
//under the License. | ||
|
||
package com.cloud.extension; | ||
|
||
import org.apache.cloudstack.api.Identity; | ||
import org.apache.cloudstack.api.InternalIdentity; | ||
|
||
public interface ExtensionCustomAction extends InternalIdentity, Identity { | ||
String getName(); | ||
|
||
String getDescription(); | ||
|
||
String getRolesList(); | ||
} |
24 changes: 24 additions & 0 deletions
24
api/src/main/java/com/cloud/extension/ExtensionResourceMap.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//Licensed to the Apache Software Foundation (ASF) under one | ||
//or more contributor license agreements. See the NOTICE file | ||
//distributed with this work for additional information | ||
//regarding copyright ownership. The ASF licenses this file | ||
//to you under the Apache License, Version 2.0 (the | ||
//"License"); you may not use this file except in compliance | ||
//with the License. You may obtain a copy of the License at | ||
// | ||
//http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
//Unless required by applicable law or agreed to in writing, | ||
//software distributed under the License is distributed on an | ||
//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
//KIND, either express or implied. See the License for the | ||
//specific language governing permissions and limitations | ||
//under the License. | ||
|
||
package com.cloud.extension; | ||
|
||
import org.apache.cloudstack.api.Identity; | ||
import org.apache.cloudstack.api.InternalIdentity; | ||
|
||
public interface ExtensionResourceMap extends InternalIdentity, Identity { | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,4 +151,6 @@ public enum TemplateFilter { | |
|
||
CPU.CPUArch getArch(); | ||
|
||
Long getExtensionId(); | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
|
||
import com.cloud.host.Host; | ||
import com.cloud.user.Account; | ||
import com.cloud.vm.VmDetailConstants; | ||
import org.apache.cloudstack.acl.RoleType; | ||
import org.apache.cloudstack.api.APICommand; | ||
import org.apache.cloudstack.api.ApiConstants; | ||
|
@@ -28,7 +29,9 @@ | |
import org.apache.cloudstack.api.response.GuestOSCategoryResponse; | ||
import org.apache.cloudstack.api.response.HostResponse; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@APICommand(name = "updateHost", description = "Updates a host.", responseObject = HostResponse.class, | ||
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) | ||
|
@@ -67,6 +70,9 @@ public class UpdateHostCmd extends BaseCmd { | |
@Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "Add an annotation to this host", since = "4.11", authorized = {RoleType.Admin}) | ||
private String annotation; | ||
|
||
@Parameter(name = ApiConstants.EXTERNAL_DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format externaldetails[i].keyname=keyvalue. Example: externaldetails[0].endpoint.url=urlvalue", since = "4.21.0") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
protected Map externalDetails; | ||
|
||
///////////////////////////////////////////////////// | ||
/////////////////// Accessors /////////////////////// | ||
///////////////////////////////////////////////////// | ||
|
@@ -103,6 +109,16 @@ public String getAnnotation() { | |
return annotation; | ||
} | ||
|
||
public Map<String, String> getExternalDetails() { | ||
Map<String, String> customparameterMap = convertDetailsToMap(externalDetails); | ||
Map<String, String> details = new HashMap<>(); | ||
for (String key : customparameterMap.keySet()) { | ||
String value = customparameterMap.get(key); | ||
details.put(VmDetailConstants.EXTERNAL_DETAIL_PREFIX + key, value); | ||
} | ||
return details; | ||
} | ||
|
||
///////////////////////////////////////////////////// | ||
/////////////// API Implementation/////////////////// | ||
///////////////////////////////////////////////////// | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import com.cloud.vm.VmDetailConstants; | ||
import org.apache.cloudstack.api.APICommand; | ||
import org.apache.cloudstack.api.ApiConstants; | ||
import org.apache.cloudstack.api.ApiErrorCode; | ||
|
@@ -251,6 +252,8 @@ public class CreateServiceOfferingCmd extends BaseCmd { | |
since="4.20") | ||
private Boolean purgeResources; | ||
|
||
@Parameter(name = ApiConstants.EXTERNAL_DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format externaldetails[i].keyname=keyvalue. Example: externaldetails[0].endpoint.url=urlvalue", since = "4.21.0") | ||
DaanHoogland marked this conversation as resolved.
Show resolved
Hide resolved
|
||
protected Map externalDetails; | ||
|
||
|
||
///////////////////////////////////////////////////// | ||
|
@@ -359,9 +362,21 @@ public Map<String, String> getDetails() { | |
} | ||
} | ||
} | ||
|
||
detailsMap.putAll(getExternalDetails()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see? these are just |
||
return detailsMap; | ||
} | ||
|
||
public Map<String, String> getExternalDetails() { | ||
Map<String, String> customparameterMap = convertDetailsToMap(externalDetails); | ||
Map<String, String> details = new HashMap<>(); | ||
for (String key : customparameterMap.keySet()) { | ||
String value = customparameterMap.get(key); | ||
details.put(VmDetailConstants.EXTERNAL_DETAIL_PREFIX + key, value); | ||
} | ||
return details; | ||
} | ||
|
||
public Long getRootDiskSize() { | ||
return rootDiskSize; | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.