use of com.emc.storageos.model.varray.NetworkCreate in project coprhd-controller by CoprHD.
the class ApiTest method zoneCosSetup.
private void zoneCosSetup() {
VirtualArrayList nList = rSTAdmin1.path("/vdc/varrays/").get(VirtualArrayList.class);
Assert.assertEquals(1, nList.getVirtualArrays().size());
_nh = nList.getVirtualArrays().get(0).getId();
_log.info("varray: " + _nh.toString());
NetworkCreate param = new NetworkCreate();
param.setTransportType("IP");
param.setLabel("iptz");
_iptzone = rZAdmin.path(String.format("/vdc/varrays/%s/networks", _nh).toString()).post(NetworkRestRep.class, param);
NetworkCreate fctzone = new NetworkCreate();
fctzone.setTransportType("FC");
fctzone.setLabel("fctz");
_fctzone = rZAdmin.path(String.format("/vdc/varrays/%s/networks", _nh).toString()).post(NetworkRestRep.class, fctzone);
FileVirtualPoolParam paramCosFile = new FileVirtualPoolParam();
paramCosFile.setName("isilon-file");
paramCosFile.setProtocols(new HashSet<String>());
paramCosFile.getProtocols().add(StorageProtocol.File.NFS.name());
_cosFile = rZAdmin.path("/file/vpools").post(FileVirtualPoolRestRep.class, paramCosFile);
BlockVirtualPoolParam paramCosBlock = new BlockVirtualPoolParam();
paramCosBlock.setName("vnx-block");
paramCosBlock.setProtocols(new HashSet<String>());
paramCosBlock.getProtocols().add(StorageProtocol.Block.FC.name());
paramCosBlock.setProvisionType("Thick");
paramCosBlock.setMaxPaths(2);
_cosBlock = rZAdminGr.path("/block/vpools").post(BlockVirtualPoolRestRep.class, paramCosBlock);
ACLAssignmentChanges changes = new ACLAssignmentChanges();
changes.setAdd(new ArrayList<ACLEntry>());
ACLEntry entry1 = new ACLEntry();
entry1.setTenant(subtenant1Id.toString());
entry1.setAces(new ArrayList<String>());
entry1.getAces().add("USE");
changes.getAdd().add(entry1);
ClientResponse resp = rSys.path(String.format(_blockCosAclUrl, _cosBlock.getId().toString())).put(ClientResponse.class, changes);
Assert.assertEquals(200, resp.getStatus());
resp = rSys.path(String.format(_fileCosAclUrl, _cosFile.getId().toString())).put(ClientResponse.class, changes);
Assert.assertEquals(200, resp.getStatus());
}
use of com.emc.storageos.model.varray.NetworkCreate in project coprhd-controller by CoprHD.
the class Networks method createIpNetwork.
@FlashException("list")
public static void createIpNetwork(String name, String virtualArrayId) {
NetworkCreate param = new NetworkCreate();
param.setLabel(name);
param.setTransportType(TransportProtocols.IP);
if (StringUtils.isNotBlank(virtualArrayId)) {
param.setVarrays(uris(virtualArrayId));
}
NetworkRestRep network = NetworkUtils.create(param);
edit(stringId(network), virtualArrayId);
}
Aggregations