-
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
50
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
50 commits
Select commit
Hold shift + click to select a range
6306ed6
Network Extension: Orchestrate external Network devices
weizhouapache 2fd4f3b
gha: fix EOF and license
weizhouapache b135a48
add unit tests
weizhouapache 88449d2
gha: fix EOF again
weizhouapache 08d5877
api/server: revert changes on updatePhysicalNetwork
weizhouapache 5ac8628
ExtensionsManagerImpl: minor changes
weizhouapache 7fd1005
UI: list extensions with type=Orchestrator when register template/iso…
weizhouapache 0fb5d3d
api/server: apply suggestions
weizhouapache 2949ed9
network extension: add service CustomAction
weizhouapache b40e821
NE: UI cleanup
weizhouapache 82efbaf
NE: more unit tests and UI optimization
weizhouapache 5b97e04
test: log custom actions
weizhouapache c1d2911
NE: apply copilot's suggestions
weizhouapache bfe588e
NE: check vpc CustomAction provider instead of first tier and cleanup UI
weizhouapache b5fcb40
Update framework/extensions/src/main/java/org/apache/cloudstack/frame…
weizhouapache 7e8d8ef
NE: VIF binding hooks for OVS-backed extensions
msinhore 5872c2d
NE: persist OVN broadcast/isolation URI on NIC for vif.binding=lswitch
msinhore d05c902
NE: persist OVN broadcast type and URI on Network for vif.binding=lsw…
msinhore 9f4cacf
UI: fix provider list when add vpc offering
weizhouapache de098e1
extension: remove resourceId and resourceType from listExtensions
weizhouapache efb7908
server: optimize listSupportedNetworkServiceProviders
weizhouapache fb00e62
framework: Add command constants
weizhouapache 979b174
test: add services (SourceNat,StaticNat,PortForwarding,Firewall,Lb,Us…
weizhouapache 15f0002
create method runVirtualMachineCustomAction
weizhouapache 6b535f5
NE: refactor the ovn support
weizhouapache 7b62a52
NE: pass physical network and network details and payload in a JSON file
weizhouapache 3fc8852
NE: update broadcast_uri of existing nics
weizhouapache 653c96b
NE: apply Vishesh's suggestion
weizhouapache bddd9b8
NE: pass network/nic IPv6 information to extension
weizhouapache e85f04b
NE: apply copilot's suggestions
weizhouapache 81d7ac3
Apply Vishesh's suggestions
weizhouapache 8779b59
NE: apply Vishesh's suggestion part2
weizhouapache 07e8de8
NE: apply Vishesh's suggestion part3
weizhouapache 93dda5b
NE: add IPv6 address to logging and restore data
weizhouapache c359033
NE; remove set-dhcp-options
weizhouapache d8123ea
NE: add commands for prepare nic and release nic
weizhouapache 99ccce0
NE: replace json string with json object
weizhouapache bc155bd
NE: add prepare-nic / release-nic in README.md
weizhouapache 190901b
NE: consider vpc tiers in resolveExtensionForVpc
weizhouapache 6d53f33
NE: add method addNicToPayload
weizhouapache dd09de9
NE: Add addExtensionIpToPayload and addNetworkDnsToPayload
weizhouapache 5272912
NE: add addPublicIpToPayload
weizhouapache dfdb3cb
NE: change cidr to vpc_cidr when implement a VPC
weizhouapache 1fb69e9
NE: add network guest_type to payload
weizhouapache 083cce1
api,engine: add method removeDnsEntry
weizhouapache 9cffed8
NE: add remove-dns-entry
weizhouapache 3dfe5d5
NE: add network dns and domain to dns payload
weizhouapache ac5d51d
NE: add nic_uuid to restore data
weizhouapache b764af4
NE: add network dns and domain to restore data
weizhouapache e61e0b5
NE: support NetworkExtension as an isolation method
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.