-
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
54
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.
Draft
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
e608669
Network Extension: Orchestrate external Network devices
weizhouapache 6ff915f
gha: fix EOF and license
weizhouapache eb4e8bc
add unit tests
weizhouapache f44cd7e
gha: fix EOF again
weizhouapache ab2306b
api/server: revert changes on updatePhysicalNetwork
weizhouapache 37b7a2f
ExtensionsManagerImpl: minor changes
weizhouapache f8201c6
UI: list extensions with type=Orchestrator when register template/iso…
weizhouapache 7af452d
api/server: apply suggestions
weizhouapache 91af39b
network extension: add service CustomAction
weizhouapache 8454a7f
NE: UI cleanup
weizhouapache f7b5723
NE: more unit tests and UI optimization
weizhouapache bfbcf51
test: log custom actions
weizhouapache e9b6c2f
NE: apply copilot's suggestions
weizhouapache 8c42632
NE: check vpc CustomAction provider instead of first tier and cleanup UI
weizhouapache 5dd7afd
Update framework/extensions/src/main/java/org/apache/cloudstack/frame…
weizhouapache 0ccc8e2
NE: VIF binding hooks for OVS-backed extensions
msinhore 8d07652
NE: persist OVN broadcast/isolation URI on NIC for vif.binding=lswitch
msinhore 70459a3
NE: persist OVN broadcast type and URI on Network for vif.binding=lsw…
msinhore 99540cc
UI: fix provider list when add vpc offering
weizhouapache fe9abb6
extension: remove resourceId and resourceType from listExtensions
weizhouapache a9a3c56
server: optimize listSupportedNetworkServiceProviders
weizhouapache 607daba
framework: Add command constants
weizhouapache 550b4ca
test: add services (SourceNat,StaticNat,PortForwarding,Firewall,Lb,Us…
weizhouapache 275b727
create method runVirtualMachineCustomAction
weizhouapache 9b2a8f2
NE: refactor the ovn support
weizhouapache 0b68dbd
NE: pass physical network and network details and payload in a JSON file
weizhouapache 0e991b9
NE: update broadcast_uri of existing nics
weizhouapache e97e6e8
NE: apply Vishesh's suggestion
weizhouapache f9a9578
NE: pass network/nic IPv6 information to extension
weizhouapache 54c02c3
NE: apply copilot's suggestions
weizhouapache bc395f6
Apply Vishesh's suggestions
weizhouapache 42b960a
NE: apply Vishesh's suggestion part2
weizhouapache bfac8af
NE: apply Vishesh's suggestion part3
weizhouapache 1b8716b
NE: add IPv6 address to logging and restore data
weizhouapache 64275da
NE; remove set-dhcp-options
weizhouapache bf03b08
NE: add commands for prepare nic and release nic
weizhouapache 68dab38
NE: replace json string with json object
weizhouapache e9b05f5
NE: add prepare-nic / release-nic in README.md
weizhouapache a9419f2
NE: consider vpc tiers in resolveExtensionForVpc
weizhouapache 93e62e6
NE: add method addNicToPayload
weizhouapache d8943c7
NE: Add addExtensionIpToPayload and addNetworkDnsToPayload
weizhouapache cb3abc1
NE: add addPublicIpToPayload
weizhouapache efbe58e
NE: change cidr to vpc_cidr when implement a VPC
weizhouapache 8dc9e4e
NE: add network guest_type to payload
weizhouapache c4fadec
api,engine: add method removeDnsEntry
weizhouapache 500d588
NE: add remove-dns-entry
weizhouapache 2390cd0
NE: add network dns and domain to dns payload
weizhouapache 8dcb34b
NE: add nic_uuid to restore data
weizhouapache 4f2b2f9
NE: add network dns and domain to restore data
weizhouapache c05d46b
NE: support NetworkExtension as an isolation method
weizhouapache f469e8b
NE: fix getNetworkCapabilitiesForProvider
weizhouapache e0873af
NE: 'network.broadcast_uri' and 'network.broadcast_domain_type' are r…
weizhouapache b52c124
NE: do not set createVlan to false
weizhouapache 8dc2779
NE: support Shared networks in NetworkExtensionGuestNetworkGuru
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
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.