use of org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol in project ovirt-engine by oVirt.
the class NetworkInSyncWithVdsNetworkInterface method addReportedIpv6Configuration.
private void addReportedIpv6Configuration(ReportedConfigurations result) {
if (!isIpv6PrimaryAddressExist()) {
return;
}
Ipv6BootProtocol definedIpv6BootProtocol = getIpv6PrimaryAddress().getBootProtocol();
result.add(ReportedConfigurationType.IPV6_BOOT_PROTOCOL, iface.getIpv6BootProtocol(), definedIpv6BootProtocol);
if (definedIpv6BootProtocol == Ipv6BootProtocol.STATIC_IP && iface.getIpv6BootProtocol() == definedIpv6BootProtocol) {
result.add(ReportedConfigurationType.IPV6_PREFIX, iface.getIpv6Prefix(), getIpv6PrimaryAddress().getPrefix(), isIpv6PrefixInSync());
result.add(ReportedConfigurationType.IPV6_ADDRESS, iface.getIpv6Address(), getIpv6PrimaryAddress().getAddress());
result.add(ReportedConfigurationType.IPV6_GATEWAY, iface.getIpv6Gateway(), getIpv6PrimaryAddress().getGateway(), isIpv6GatewayInSync());
}
}
use of org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol in project ovirt-engine by oVirt.
the class LogicalNetworkModelParametersHelper method populateIpv6Details.
public static void populateIpv6Details(InterfacePropertiesAccessor interfacePropertiesAccessor, IpV6Address ipv6Address) {
final Ipv6BootProtocol ipv6BootProtocol = interfacePropertiesAccessor.getIpv6BootProtocol();
ipv6Address.setBootProtocol(ipv6BootProtocol);
final boolean staticBootProtocol = Ipv6BootProtocol.STATIC_IP == ipv6BootProtocol;
ipv6Address.setAddress(staticBootProtocol ? interfacePropertiesAccessor.getIpv6Address() : null);
ipv6Address.setPrefix(staticBootProtocol ? interfacePropertiesAccessor.getIpv6Prefix() : null);
ipv6Address.setGateway(staticBootProtocol ? interfacePropertiesAccessor.getIpv6Gateway() : null);
}
use of org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol in project ovirt-engine by oVirt.
the class HostSetupNetworksVDSCommand method addIpv6BootProtocol.
private void addIpv6BootProtocol(Map<String, Object> opts, HostNetwork attachment) {
final Ipv6BootProtocol ipv6BootProtocol = attachment.getIpv6BootProtocol();
opts.put(DHCPV6_BOOT_PROTOCOL, Ipv6BootProtocol.DHCP == ipv6BootProtocol);
opts.put(DHCPV6_AUTOCONF, Ipv6BootProtocol.AUTOCONF == ipv6BootProtocol);
if (Ipv6BootProtocol.STATIC_IP == ipv6BootProtocol) {
putIfNotEmpty(opts, "ipv6addr", getIpv6Address(attachment));
putIfNotEmpty(opts, "ipv6gateway", attachment.getIpv6Gateway());
}
}
use of org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol in project ovirt-engine by oVirt.
the class ItemInfoPopup method addBootProtoAndIpInfo.
private void addBootProtoAndIpInfo(InterfacePropertiesAccessor accessor) {
insertHorizontalLine();
// IPv4
addRow(// $NON-NLS-1$
templates.strongTextWithColor(// $NON-NLS-1$
constants.ipv4ItemInfo() + ":", SafeStylesUtils.forTrustedColor(WHITE_TEXT_COLOR)));
if (accessor.isIpv4Available()) {
Ipv4BootProtocol ipv4BootProtocol = accessor.getIpv4BootProtocol();
addRow(constants.bootProtocolItemInfo(), IPV4_RENDERER.render(ipv4BootProtocol));
addNonNullOrEmptyValueRow(constants.addressItemInfo(), accessor.getIpv4Address());
addNonNullOrEmptyValueRow(constants.subnetItemInfo(), accessor.getIpv4Netmask());
addNonNullOrEmptyValueRow(constants.gatewayItemInfo(), accessor.getIpv4Gateway());
} else {
addRow(SafeHtmlUtils.fromSafeConstant(constants.notAvailableLabel()));
}
// IPv6
addRow(// $NON-NLS-1$
templates.strongTextWithColor(// $NON-NLS-1$
constants.ipv6ItemInfo() + ":", SafeStylesUtils.forTrustedColor(WHITE_TEXT_COLOR)));
if (accessor.isIpv6Available()) {
Ipv6BootProtocol ipv6BootProtocol = accessor.getIpv6BootProtocol();
addRow(constants.bootProtocolItemInfo(), IPV6_RENDERER.render(ipv6BootProtocol));
addNonNullOrEmptyValueRow(constants.addressItemInfo(), accessor.getIpv6Address());
addNonNullOrEmptyValueRow(constants.prefixItemInfo(), accessor.getIpv6Prefix() != null ? accessor.getIpv6Prefix().toString() : null);
addNonNullOrEmptyValueRow(constants.gatewayItemInfo(), accessor.getIpv6Gateway());
} else {
addRow(SafeHtmlUtils.fromSafeConstant(constants.notAvailableLabel()));
}
}
use of org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol in project ovirt-engine by oVirt.
the class VmInitModel method updateNetworkDisplay.
/* Update displayed network properties to reflect currently-selected item */
private void updateNetworkDisplay() {
String networkName = null;
VmInitNetwork vmInitNetwork = null;
if (getNetworkList().getSelectedItem() != null) {
networkName = getNetworkList().getSelectedItem();
vmInitNetwork = networkMap.get(networkName);
}
final Ipv4BootProtocol ipv4bootProtocol = vmInitNetwork == null || vmInitNetwork.getBootProtocol() == null ? Ipv4BootProtocol.NONE : vmInitNetwork.getBootProtocol();
getIpv4BootProtocolList().setSelectedItem(ipv4bootProtocol);
final Ipv6BootProtocol ipv6bootProtocol = vmInitNetwork == null || vmInitNetwork.getIpv6BootProtocol() == null ? Ipv6BootProtocol.NONE : vmInitNetwork.getIpv6BootProtocol();
getIpv6BootProtocolList().setSelectedItem(ipv6bootProtocol);
getNetworkIpAddress().setEntity(vmInitNetwork == null ? null : vmInitNetwork.getIp());
getNetworkNetmask().setEntity(vmInitNetwork == null ? null : vmInitNetwork.getNetmask());
getNetworkGateway().setEntity(vmInitNetwork == null ? null : vmInitNetwork.getGateway());
getNetworkIpv6Address().setEntity(vmInitNetwork == null ? null : vmInitNetwork.getIpv6Address());
getNetworkIpv6Prefix().setEntity(vmInitNetwork == null ? null : vmInitNetwork.getIpv6Prefix());
getNetworkIpv6Gateway().setEntity(vmInitNetwork == null ? null : vmInitNetwork.getIpv6Gateway());
hardCodeStartOnBoot();
}
Aggregations