本文整理汇总了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);
}
示例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);
}
示例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");
}
示例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;
示例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);
示例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;