-
Notifications
You must be signed in to change notification settings - Fork 1.3k
IPv6 with static routing #5594
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
Closed
Closed
IPv6 with static routing #5594
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b324477
IPv6: network offering
weizhouapache c50d573
IPv6: add APIs for IPv6 range
weizhouapache 9876d5e
IPv6: create isolated network with IPv6
weizhouapache 4f70cca
IPv6: configure VR of isolated networks
weizhouapache 38308c7
IPv6: add default IPv6 route in VR of isolated networks
weizhouapache 95cc8f5
Reformat server/src/main/java/com/cloud/network/NetworkServiceImpl.java
weizhouapache c35d8e3
IPv6: update network to offering which support IPv6
weizhouapache f8678cb
IPv6: update vm nic ipv6 address when update network to new offering
weizhouapache 48349e1
IPv6: configure VPC VR to support multiple tiers with IPv6
weizhouapache c57d482
IPv6: add IPv6 fireawll in API/UI
weizhouapache 1630809
IPv6: remove account setting routerIpv6Gateway and add specifyRouterI…
weizhouapache 5843e79
IPv6: add RDNSS in radvd.conf
weizhouapache 1888622
IPv6/UI: support ipv6 protocols in Network ACL
weizhouapache 091f903
IPv6: update ipv6 range via API/UI
weizhouapache b5f03d3
review comments
shwstppr a930192
review comment
shwstppr 4c33b1d
IPv6: fix Exception while calculate EUI64 address
weizhouapache f71a342
IPv6: fix wrong public ipv6 in VPC VR
weizhouapache a105a5e
UI: add back ispersistent and specifyvlan (removed by mistake)
weizhouapache ac6a3bd
IPv6: change some labels
weizhouapache 9a047f0
IPv6: add vlan of Outbound IPv6 network
weizhouapache 7becfb7
IPv6: update routerIpv6 to SLAAC IPv6 address of VR if routerIpv6 is …
weizhouapache f3e9c6b
IPv6: add created/removed columns
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| // 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.network; | ||
|
|
||
| import java.util.Date; | ||
|
|
||
| import org.apache.cloudstack.api.Displayable; | ||
| import org.apache.cloudstack.api.Identity; | ||
| import org.apache.cloudstack.api.InternalIdentity; | ||
| import org.apache.commons.lang3.StringUtils; | ||
|
|
||
| import com.cloud.exception.InvalidParameterValueException; | ||
|
|
||
| /** | ||
| * | ||
| * - Allocated = null | ||
| * - AccountId = null | ||
| * - DomainId = null | ||
| * | ||
| * - State = Allocated | ||
| * - AccountId = account owner. | ||
| * - DomainId = domain of the account owner. | ||
| * - Allocated = time it was allocated. | ||
| */ | ||
| public interface Ipv6Address extends Identity, InternalIdentity, Displayable { | ||
|
|
||
| enum InternetProtocol { | ||
| IPv4, IPv6, DualStack; | ||
|
|
||
| public static InternetProtocol fromValue(String protocol) { | ||
| if (StringUtils.isBlank(protocol)) { | ||
| return null; | ||
| } else if (protocol.equalsIgnoreCase("IPv4")) { | ||
| return IPv4; | ||
| } else if (protocol.equalsIgnoreCase("IPv6")) { | ||
| return IPv6; | ||
| } else if (protocol.equalsIgnoreCase("DualStack")) { | ||
| return DualStack; | ||
| } | ||
| throw new InvalidParameterValueException("Unexpected Internet Protocol : " + protocol); | ||
| } | ||
| } | ||
|
|
||
| enum IPv6Routing { | ||
| Static, Dynamic; | ||
|
|
||
| public static IPv6Routing fromValue(String mode) { | ||
| if (StringUtils.isBlank(mode)) { | ||
| return null; | ||
| } else if (mode.equalsIgnoreCase("Static")) { | ||
| return Static; | ||
| } else if (mode.equalsIgnoreCase("Dynamic")) { | ||
| return Dynamic; | ||
| } | ||
|
shwstppr marked this conversation as resolved.
|
||
| throw new InvalidParameterValueException("Unexpected IPv6 routing mode : " + mode); | ||
| } | ||
| } | ||
|
|
||
| long getDataCenterId(); | ||
|
|
||
| long getPhysicalNetworkId(); | ||
|
|
||
| String getIp6Gateway(); | ||
|
|
||
| String getIp6Cidr(); | ||
|
|
||
| String getRouterIpv6(); | ||
|
|
||
| String getRouterIpv6Gateway(); | ||
|
|
||
| Long getNetworkId(); | ||
|
|
||
| Long getDomainId(); | ||
|
|
||
| Long getAccountId(); | ||
|
|
||
| Date getTakenAt(); | ||
|
|
||
| } | ||
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,79 @@ | ||
| // 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.network; | ||
|
|
||
| import com.cloud.dc.DataCenter; | ||
| import com.cloud.network.rules.FirewallRule; | ||
| import com.cloud.utils.Pair; | ||
| import com.cloud.vm.NicProfile; | ||
| import org.apache.cloudstack.api.command.admin.ipv6.CreateIpv6RangeCmd; | ||
| import org.apache.cloudstack.api.command.admin.ipv6.DedicateIpv6RangeCmd; | ||
| import org.apache.cloudstack.api.command.admin.ipv6.DeleteIpv6RangeCmd; | ||
| import org.apache.cloudstack.api.command.admin.ipv6.ListIpv6RangesCmd; | ||
| import org.apache.cloudstack.api.command.admin.ipv6.ReleaseIpv6RangeCmd; | ||
| import org.apache.cloudstack.api.command.admin.ipv6.UpdateIpv6RangeCmd; | ||
| import org.apache.cloudstack.api.command.user.ipv6.CreateIpv6FirewallRuleCmd; | ||
| import org.apache.cloudstack.api.command.user.ipv6.ListIpv6FirewallRulesCmd; | ||
| import org.apache.cloudstack.api.command.user.ipv6.UpdateIpv6FirewallRuleCmd; | ||
| import org.apache.cloudstack.api.response.Ipv6RangeResponse; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public interface Ipv6Service { | ||
|
|
||
| public static final String IPV6_CIDR_SUFFIX = "/64"; | ||
|
|
||
| Ipv6Address createIpv6Range(CreateIpv6RangeCmd cmd); | ||
|
|
||
| Ipv6Address updateIpv6Range(UpdateIpv6RangeCmd cmd); | ||
|
|
||
| boolean deleteIpv6Range(DeleteIpv6RangeCmd cmd); | ||
|
|
||
| Ipv6Address dedicateIpv6Range(DedicateIpv6RangeCmd cmd); | ||
|
|
||
| boolean releaseIpv6Range(ReleaseIpv6RangeCmd cmd); | ||
|
|
||
| Ipv6Address takeIpv6Range(long zoneId, boolean isRouterIpv6Null); | ||
|
|
||
| Pair<List<? extends Ipv6Address>, Integer> searchForIpv6Range(ListIpv6RangesCmd cmd); | ||
|
|
||
| Ipv6RangeResponse createIpv6RangeResponse(Ipv6Address address); | ||
|
|
||
| Ipv6Address.InternetProtocol getNetworkOfferingInternetProtocol(Long offeringId); | ||
|
|
||
| Ipv6Address.IPv6Routing getNetworkOfferingIpv6Routing(Long offeringId); | ||
|
|
||
| boolean isIpv6Supported(Long offeringId); | ||
|
|
||
| Boolean isIpv6FirewallEnabled(Long offeringId); | ||
|
|
||
| Boolean isSpecifyRouterIpv6(Long offeringId); | ||
|
|
||
| void updateNicIpv6(NicProfile nic, DataCenter dc, Network network); | ||
|
|
||
| FirewallRule updateIpv6FirewallRule(UpdateIpv6FirewallRuleCmd updateIpv6FirewallRuleCmd); | ||
|
|
||
| Pair<List<? extends FirewallRule>,Integer> listIpv6FirewallRules(ListIpv6FirewallRulesCmd listIpv6FirewallRulesCmd); | ||
|
|
||
| boolean revokeIpv6FirewallRule(Long id); | ||
|
|
||
| FirewallRule createIpv6FirewallRule(CreateIpv6FirewallRuleCmd createIpv6FirewallRuleCmd); | ||
|
|
||
| FirewallRule getIpv6FirewallRule(Long entityId); | ||
|
|
||
| boolean applyIpv6FirewallRule(long id); | ||
| } |
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
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.