当前位置: 首页>>代码示例>>Java>>正文


Java NicVO.setIPv4Netmask方法代码示例

本文整理汇总了Java中com.cloud.vm.NicVO.setIPv4Netmask方法的典型用法代码示例。如果您正苦于以下问题:Java NicVO.setIPv4Netmask方法的具体用法?Java NicVO.setIPv4Netmask怎么用?Java NicVO.setIPv4Netmask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.cloud.vm.NicVO的用法示例。


在下文中一共展示了NicVO.setIPv4Netmask方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: applyProfileToNicForRelease

import com.cloud.vm.NicVO; //导入方法依赖的package包/类
protected void applyProfileToNicForRelease(final NicVO vo, final NicProfile profile) {
    vo.setIPv4Gateway(profile.getIPv4Gateway());
    vo.setAddressFormat(profile.getFormat());
    vo.setIPv4Address(profile.getIPv4Address());
    vo.setIPv6Address(profile.getIPv6Address());
    vo.setMacAddress(profile.getMacAddress());
    if (profile.getReservationStrategy() != null) {
        vo.setReservationStrategy(profile.getReservationStrategy());
    }
    vo.setBroadcastUri(profile.getBroadCastUri());
    vo.setIsolationUri(profile.getIsolationUri());
    vo.setIPv4Netmask(profile.getIPv4Netmask());
}
 
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:14,代码来源:NetworkOrchestrator.java

示例2: applyProfileToNic

import com.cloud.vm.NicVO; //导入方法依赖的package包/类
protected Integer applyProfileToNic(final NicVO vo, final NicProfile profile, Integer deviceId) {
    if (profile.getDeviceId() != null) {
        vo.setDeviceId(profile.getDeviceId());
    } else if (deviceId != null) {
        vo.setDeviceId(deviceId++);
    }

    if (profile.getReservationStrategy() != null) {
        vo.setReservationStrategy(profile.getReservationStrategy());
    }

    vo.setDefaultNic(profile.isDefaultNic());

    vo.setIPv4Address(profile.getIPv4Address());
    vo.setAddressFormat(profile.getFormat());

    if (profile.getMacAddress() != null) {
        vo.setMacAddress(profile.getMacAddress());
    }

    vo.setMode(profile.getMode());
    vo.setIPv4Netmask(profile.getIPv4Netmask());
    vo.setIPv4Gateway(profile.getIPv4Gateway());

    if (profile.getBroadCastUri() != null) {
        vo.setBroadcastUri(profile.getBroadCastUri());
    }

    if (profile.getIsolationUri() != null) {
        vo.setIsolationUri(profile.getIsolationUri());
    }

    vo.setState(Nic.State.Allocated);

    vo.setIPv6Address(profile.getIPv6Address());
    vo.setIPv6Gateway(profile.getIPv6Gateway());
    vo.setIPv6Cidr(profile.getIPv6Cidr());

    return deviceId;
}
 
开发者ID:MissionCriticalCloud,项目名称:cosmic,代码行数:41,代码来源:NetworkOrchestrator.java


注:本文中的com.cloud.vm.NicVO.setIPv4Netmask方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。