當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。