-
Notifications
You must be signed in to change notification settings - Fork 8
/
zos_rmb_requests.ts
135 lines (109 loc) · 4.08 KB
/
zos_rmb_requests.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import { ZOSGetDeploymentModel, ZOSNodeModel } from "../src";
import { getClient } from "./client_loader";
import { log } from "./utils";
async function pingNode(client, nodeId) {
const res = await client.zos.pingNode(nodeId);
log("================= Pinging node =================");
log(res);
log("================= Pinging node =================");
}
async function getDeployment(client, contractId) {
const res = await client.zos.getDeployment(contractId);
log("================= Getting deployment =================");
log(res);
log("================= Getting deployment =================");
}
async function hasPublicIPv6(client, nodeId) {
const res = await client.zos.hasPublicIPv6(nodeId);
log("================= Checking public ipv6 =================");
log(res);
log("================= Checking public ipv6 =================");
}
async function listNetworkInterfaces(client, nodeId) {
const res = await client.zos.listNetworkInterfaces(nodeId);
log("================= Listing network interfaces =================");
log(res);
log("================= Listing network interfaces =================");
}
async function listNetworkPublicIPs(client, nodeId) {
const res = await client.zos.listNetworkPublicIPs(nodeId);
log("================= Listing public ips =================");
log(res);
log("================= Listing public ips =================");
}
async function getNetworkPublicConfig(client, nodeId) {
const res = await client.zos.getNetworkPublicConfig(nodeId);
log("================= Getting public config =================");
log(res);
log("================= Getting public config =================");
}
async function getStoragePools(client, nodeId) {
const res = await client.zos.getStoragePools(nodeId);
log("================= Getting storage pools =================");
log(res);
log("================= Getting storage pools =================");
}
async function getNodeGPUInfo(client, nodeId) {
const res = await client.zos.getNodeGPUInfo(nodeId);
log("================= Getting GPU info =================");
log(res);
log("================= Getting GPU info =================");
}
async function getNodePerfTests(client, nodeId) {
const res = await client.zos.getNodePerfTests(nodeId);
log("================= Getting perf tests =================");
log(res);
log("================= Getting perf tests =================");
}
async function getNodeIPerfTest(client, nodeId) {
const res = await client.zos.getNodeIPerfTest(nodeId);
log("================= Getting IPerf test =================");
log(res);
log("================= Getting IPerf test =================");
}
async function getNodeIPValidation(client, nodeId) {
const res = await client.zos.getNodeIPValidation(nodeId);
log("================= Getting Node IP Validation test =================");
log(res);
log("================= Getting Node IP Validation test =================");
}
async function getNodeCPUTest(client, nodeId) {
const res = await client.zos.getNodeCPUTest(nodeId);
log("================= Getting node CPU test =================");
log(res);
log("================= Getting node CPU test =================");
}
async function main() {
const grid3 = await getClient();
const nodeId = 11;
const contractId = 2766;
const contract: ZOSGetDeploymentModel = {
contractId: contractId,
};
const node: ZOSNodeModel = {
nodeId: nodeId,
};
//Ping Node
await pingNode(grid3, node);
//Get deployment
await getDeployment(grid3, contract);
//Has public IPV6
await hasPublicIPv6(grid3, node);
//List network interfaces
await listNetworkInterfaces(grid3, node);
//List network public IPs
await listNetworkPublicIPs(grid3, node);
//Get network public config
await getNetworkPublicConfig(grid3, node);
//Get storage pools
await getStoragePools(grid3, node);
//Get GPU info
await getNodeGPUInfo(grid3, node);
// Get perf tests
await getNodePerfTests(grid3, node);
await getNodeCPUTest(grid3, node);
await getNodeIPValidation(grid3, node);
await getNodeIPerfTest(grid3, node);
await grid3.disconnect();
}
main();