-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Network Extension: Orchestrate external Network devices #13032
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
Draft
weizhouapache
wants to merge
29
commits into
apache:main
Choose a base branch
from
weizhouapache:4.23-network-extension
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.
+10,902
−329
Draft
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
5bdc5b0
Network Extension: Orchestrate external Network devices
weizhouapache 24807f7
gha: fix EOF and license
weizhouapache 45e79ea
add unit tests
weizhouapache f2beb98
gha: fix EOF again
weizhouapache 6cd73c7
api/server: revert changes on updatePhysicalNetwork
weizhouapache 8f5b438
ExtensionsManagerImpl: minor changes
weizhouapache 00c157d
UI: list extensions with type=Orchestrator when register template/iso…
weizhouapache ab0cea9
api/server: apply suggestions
weizhouapache 076b630
network extension: add service CustomAction
weizhouapache a425016
NE: UI cleanup
weizhouapache 292c15d
NE: more unit tests and UI optimization
weizhouapache 253e96c
test: log custom actions
weizhouapache fe87587
NE: apply copilot's suggestions
weizhouapache 454c681
NE: check vpc CustomAction provider instead of first tier and cleanup UI
weizhouapache 9670906
Update framework/extensions/src/main/java/org/apache/cloudstack/frame…
weizhouapache 740e002
NE: VIF binding hooks for OVS-backed extensions
msinhore 2dcd151
NE: persist OVN broadcast/isolation URI on NIC for vif.binding=lswitch
msinhore fe7a7fd
NE: persist OVN broadcast type and URI on Network for vif.binding=lsw…
msinhore ec253b0
UI: fix provider list when add vpc offering
weizhouapache 070d7df
extension: remove resourceId and resourceType from listExtensions
weizhouapache 447e7a9
server: optimize listSupportedNetworkServiceProviders
weizhouapache 9a0ca17
framework: Add command constants
weizhouapache bc18bb2
test: add services (SourceNat,StaticNat,PortForwarding,Firewall,Lb,Us…
weizhouapache cd68d6b
create method runVirtualMachineCustomAction
weizhouapache 82cd479
NE: refactor the ovn support
weizhouapache eba6f77
NE: pass physical network and network details and payload in a JSON file
weizhouapache 7a3db96
NE: update broadcast_uri of existing nics
weizhouapache 4f7a1a2
NE: apply Vishesh's suggestion
weizhouapache 7f7d044
NE: pass network/nic IPv6 information to extension
weizhouapache 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
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
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
74 changes: 74 additions & 0 deletions
74
api/src/main/java/org/apache/cloudstack/extension/NetworkCustomActionProvider.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,74 @@ | ||
| // 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 org.apache.cloudstack.extension; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| import com.cloud.network.Network; | ||
| import com.cloud.network.vpc.Vpc; | ||
|
|
||
| /** | ||
| * Implemented by network elements that support running custom actions on a | ||
| * managed network or VPC (e.g. NetworkExtensionElement). | ||
| * | ||
| * <p>This interface is looked up by {@code ExtensionsManagerImpl} to dispatch | ||
| * {@code runCustomAction} requests whose resource type is {@code Network} | ||
| * or {@code Vpc}.</p> | ||
| */ | ||
| public interface NetworkCustomActionProvider { | ||
|
|
||
| /** | ||
| * Returns {@code true} if this provider handles networks whose physical | ||
| * network has an ExternalNetwork service provider registered. | ||
| * | ||
| * @param network the target network | ||
| * @return {@code true} if this provider can handle the network | ||
| */ | ||
| boolean canHandleCustomAction(Network network); | ||
|
|
||
| /** | ||
| * Returns {@code true} if this provider can handle custom actions for | ||
| * the given VPC. | ||
| * | ||
| * @param vpc the target VPC | ||
| * @return {@code true} if this provider can handle the VPC | ||
| */ | ||
| boolean canHandleVpcCustomAction(Vpc vpc); | ||
|
|
||
| /** | ||
| * Runs a named custom action against the external network device that | ||
| * manages the given network. | ||
| * | ||
| * @param network the CloudStack network on which to run the action | ||
| * @param actionName the action name (e.g. {@code "reboot-device"}, {@code "dump-config"}) | ||
| * @param parameters optional parameters supplied by the caller | ||
| * @return output from the action script, or {@code null} on failure | ||
| */ | ||
| String runCustomAction(Network network, String actionName, Map<String, Object> parameters); | ||
|
|
||
| /** | ||
| * Runs a named custom action against the external network device that | ||
| * manages the given VPC. | ||
| * | ||
| * @param vpc the CloudStack VPC on which to run the action | ||
| * @param actionName the action name | ||
| * @param parameters optional parameters supplied by the caller | ||
| * @return output from the action script, or {@code null} on failure | ||
| */ | ||
| String runCustomAction(Vpc vpc, String actionName, Map<String, Object> parameters); | ||
| } |
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.