com.i2soft.resource.v20240311.Tape Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of i2up-java-sdk Show documentation
Show all versions of i2up-java-sdk Show documentation
Information2 United Data Management Platform SDK for Java
The newest version!
package com.i2soft.resource.v20240311;
import com.i2soft.http.I2Req;
import com.i2soft.http.I2Rs;
import com.i2soft.http.I2softException;
import com.i2soft.http.Response;
import com.i2soft.common.Auth;
import com.i2soft.util.StringMap;
import java.util.Map;
public final class Tape {
/**
* Auth 对象
*/
private final Auth auth;
/**
* 构建一个新对象
*
* @param auth Auth对象
*/
public Tape(Auth auth) {
this.auth = auth;
}
/**
* 磁带库 - 扫描
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map sanTapeLibraries(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/scan", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 获取带库驱动器列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapeLibraryDrivers(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/drivers", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 新建
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs createTapeLibrary(StringMap args) throws I2softException {
String url = String.format("%s/tape_library", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 磁带库 - 列表
*
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapeLibrary() throws I2softException {
String url = String.format("%s/tape_library", auth.cc_url);
Response r = auth.client.get(url, new StringMap());
return r.jsonToMap();
}
/**
* 磁带库 - 单个
*
* @param uuid: uuid
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map describeTapeLibrary(String uuid) throws I2softException {
String url = String.format("%s/tape_library/%s", auth.cc_url, uuid);
Response r = auth.client.get(url, new StringMap());
return r.jsonToMap();
}
/**
* 磁带库 - 修改
*
* @param uuid: uuid
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs modifyTapeLibrary(String uuid, StringMap args) throws I2softException {
String url = String.format("%s/tape_library/%s", auth.cc_url, uuid);
Response r = auth.client.put(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 磁带库 - 删除
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs deleteTapeLibrary(StringMap args) throws I2softException {
String url = String.format("%s/tape_library", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 磁带库 - 清点 - 刷新
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map refreshTapeLibrarySlot(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/refresh_slot", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 清点 - 扫描插槽(废弃)
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map scanSlot(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/scan_slot", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 出库 - 获取Slot
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listBusySlot(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/busy_slot", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 入库 - 扫描I/O插槽
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listBusyIeSlot(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/busy_ie_slot", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 操作
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map operateTapeLibrary(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 驱动器管理 - 操作
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs operateTapeLibraryDrivers(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/drivers_operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 介质 - 磁带池列表
*
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapePools() throws I2softException {
String url = String.format("%s/tape_media/tape_pools", auth.cc_url);
Response r = auth.client.get(url, new StringMap());
return r.jsonToMap();
}
/**
* 介质 - 磁带池 - 新建
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs createTapePool(StringMap args) throws I2softException {
String url = String.format("%s/tape_media/tape_pool", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 介质 - 磁带池 - 修改
*
* @param uuid: uuid
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs updateTapePool(String uuid, StringMap args) throws I2softException {
String url = String.format("%s/tape_media/tape_pool/%s", auth.cc_url, uuid);
Response r = auth.client.put(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 介质 - 磁带池 - 删除
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs deleteTapePool(StringMap args) throws I2softException {
String url = String.format("%s/tape_media/tape_pool", auth.cc_url);
Response r = auth.client.delete(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
/**
* 介质 - 磁带 - 操作
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map operateTapeMedia(StringMap args) throws I2softException {
String url = String.format("%s/tape_media/operate", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToMap();
}
/**
* 介质 - 磁带 - 列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapeMedia(StringMap args) throws I2softException {
String url = String.format("%s/tape_media", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 查看磁带
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapeMediaBkData(StringMap args) throws I2softException {
String url = String.format("%s/tape_media/bkdata", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 查看磁带 - 磁带数据
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapeMediaBkFiles(StringMap args) throws I2softException {
String url = String.format("%s/tape_media/bkfiles", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 查看磁带 - 磁带详情
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapeMediaDetails(StringMap args) throws I2softException {
String url = String.format("%s/tape_media/details", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 发现新带库
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map refreshTapeLibrary(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/refresh", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 磁带库 - 机械臂主机列表
*
* @param args: 参数详见 API 手册
* @return 参数详见 API 手册
* @throws I2softException:
*/
public Map listTapeLibraryRoboticArm(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/robotic_arm_list", auth.cc_url);
Response r = auth.client.get(url, args);
return r.jsonToMap();
}
/**
* 设置驱动/磁带冻结次数
*
* @param args: 参数详见 API 手册
* @return code, message
* @throws I2softException:
*/
public I2Rs.I2SmpRs setTapeLibraryFreezeNumber(StringMap args) throws I2softException {
String url = String.format("%s/tape_library/freeze_number", auth.cc_url);
Response r = auth.client.post(url, args);
return r.jsonToObject(I2Rs.I2SmpRs.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy