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


Java VirtualizationConnectorElement类代码示例

本文整理汇总了Java中org.osc.sdk.controller.element.VirtualizationConnectorElement的典型用法代码示例。如果您正苦于以下问题:Java VirtualizationConnectorElement类的具体用法?Java VirtualizationConnectorElement怎么用?Java VirtualizationConnectorElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VirtualizationConnectorElement类属于org.osc.sdk.controller.element包,在下文中一共展示了VirtualizationConnectorElement类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRedirectionApi

import org.osc.sdk.controller.element.VirtualizationConnectorElement; //导入依赖的package包/类
@Override
public SdnRedirectionApi createRedirectionApi(VirtualizationConnectorElement vc, String region) {

    if (vc == null || vc.getName() == null || vc.getName().length() == 0 || vc.getProviderIpAddress() == null) {
        throw new IllegalArgumentException(
                "Non-null VC with non-empty name, non-empty provider ip address required!");
    }

    Properties props = new Properties();

    props.setProperty(JDBC_URL, DB_URL_PREFIX + vc.getProviderIpAddress() + URL_OPTS);

    props.setProperty(JDBC_USER, DB_USER);
    props.setProperty(JDBC_PASSWORD, DB_PASSWORD);

    DataSource ds = null;
    try {
        ds = this.jdbcFactory.createDataSource(props);
    } catch (SQLException e) {
        LOG.error(e.getMessage(), e);
        throw new IllegalStateException(e.getMessage(), e);
    }

    EntityManager em = this.resourceFactory
            .getProviderFor(this.builder, singletonMap("javax.persistence.nonJtaDataSource", (Object) ds), null)
            .getResource(this.txControl);


    return new SampleSdnRedirectionApi(this.txControl, em);
}
 
开发者ID:opensecuritycontroller,项目名称:sdn-controller-nsc-plugin,代码行数:31,代码来源:SampleSdnControllerApi.java

示例2: getVirtualizationConnectorElement

import org.osc.sdk.controller.element.VirtualizationConnectorElement; //导入依赖的package包/类
private VirtualizationConnectorElement getVirtualizationConnectorElement(VirtualizationConnector vc)
        throws Exception {
    VirtualizationConnector shallowClone = new VirtualizationConnector(vc);
    shallowClone.setProviderPassword(this.encrypter.decryptAESCTR(shallowClone.getProviderPassword()));
    if (!StringUtils.isEmpty(shallowClone.getControllerPassword())) {
        shallowClone.setControllerPassword(this.encrypter.decryptAESCTR(shallowClone.getControllerPassword()));
    }
    return new VirtualizationConnectorElementImpl(shallowClone);
}
 
开发者ID:opensecuritycontroller,项目名称:osc-core,代码行数:10,代码来源:ApiFactoryServiceImpl.java

示例3: getStatus

import org.osc.sdk.controller.element.VirtualizationConnectorElement; //导入依赖的package包/类
@Override
public Status getStatus(VirtualizationConnectorElement vc, String region) throws Exception {
    return new Status(NAME, VERSION, true);
}
 
开发者ID:opensecuritycontroller,项目名称:sdn-controller-nsc-plugin,代码行数:5,代码来源:SampleSdnControllerApi.java

示例4: queryPortInfo

import org.osc.sdk.controller.element.VirtualizationConnectorElement; //导入依赖的package包/类
@Override
public HashMap<String, FlowPortInfo> queryPortInfo(VirtualizationConnectorElement vc, String region,
        HashMap<String, FlowInfo> portsQuery) throws Exception {
    throw new NotImplementedException("NSC SDN Controller does not support flow based query");
}
 
开发者ID:opensecuritycontroller,项目名称:sdn-controller-nsc-plugin,代码行数:6,代码来源:SampleSdnControllerApi.java

示例5: getStatus

import org.osc.sdk.controller.element.VirtualizationConnectorElement; //导入依赖的package包/类
/**
 * @param vc  provides context information of the virtualization connector
 * @param region  provides information about region to operate on
 * @return the status of SDN controller
 * @throws Exception upon failure
 */
Status getStatus(VirtualizationConnectorElement vc, String region) throws Exception;
 
开发者ID:opensecuritycontroller,项目名称:sdn-controller-api,代码行数:8,代码来源:SdnControllerApi.java

示例6: createRedirectionApi

import org.osc.sdk.controller.element.VirtualizationConnectorElement; //导入依赖的package包/类
/**
 * @param vc  provides context information of the virtualization connector
 * @param region  provides information about region to operate on
 * @return the APIs used by OSC to manage traffic redirection
 */
SdnRedirectionApi createRedirectionApi(VirtualizationConnectorElement vc, String region);
 
开发者ID:opensecuritycontroller,项目名称:sdn-controller-api,代码行数:7,代码来源:SdnControllerApi.java

示例7: queryPortInfo

import org.osc.sdk.controller.element.VirtualizationConnectorElement; //导入依赖的package包/类
/**
 * @param vc  provides context information of the virtualization connector
 * @param region  provides region info to operate on
 * @param portsQuery  provides the context information of the flowInfo mapped by the identifier
 * @return an object of FlowPortInfo mapped by the same identifiers provided in the input query
 * @throws Exception upon failure
 */
HashMap<String, FlowPortInfo> queryPortInfo(VirtualizationConnectorElement vc, String region,
        HashMap<String, FlowInfo> portsQuery) throws Exception;
 
开发者ID:opensecuritycontroller,项目名称:sdn-controller-api,代码行数:10,代码来源:SdnControllerApi.java


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