Skip to content

Commit fe3da37

Browse files
Add files via upload
1 parent 4d0488a commit fe3da37

File tree

9 files changed

+479
-0
lines changed

9 files changed

+479
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
compute-vm1 compute
2+
compute-vm2 compute
3+
db01 db
4+
adb01 adb
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import sys, json
2+
3+
data = json.load(sys.stdin)['data']
4+
5+
for c in data:
6+
fsize = round(c['size']/(1024),3)
7+
print (c['name'].ljust(30,' ')+" "+c['time-modified'][:19].ljust(25,' ')+f'{fsize:.3f}'.rjust(10)+" KB")
8+
9+
10+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import sys, json
2+
3+
data = json.loads(sys.argv[1])['data']
4+
5+
for c in data:
6+
print(c[sys.argv[2]])
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import sys, json
2+
3+
data = json.loads(sys.argv[1])['data']
4+
5+
print(data[sys.argv[2]])
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sys, json
2+
3+
data = json.load(sys.stdin)['data']
4+
5+
for c in data:
6+
print (" db: "+c['pdb-name']+":"+c['open-mode']+":"+c['connection-strings']['pdb-default'].split("/",1)[1])
7+
print (" id: "+c['id'])
8+
print ("")
9+
10+
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import sys, json
2+
3+
data = json.load(sys.stdin)['data']
4+
5+
for c in data:
6+
if (len(sys.argv) == 1 or sys.argv[1] == "--long" ):
7+
print(c['display-name']+":"+c['lifecycle-state']+":"+c['id'])
8+
elif (sys.argv[1] == "--names" ):
9+
print(c['display-name'])
10+
else:
11+
print(c['id'])
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import sys, json
2+
3+
data = json.load(sys.stdin)
4+
5+
for c in data:
6+
if (len(sys.argv) == 1 or sys.argv[1] == "--long" ):
7+
print(c['displayName']+":"+c['lifecycleState']+":"+c['id'])
8+
elif (sys.argv[1] == "--names" ):
9+
print(c['display-name'])
10+
else:
11+
print(c['id'])
12+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export OCI_NS=<namespace>
2+
export OCI_TID=<tenancy_id>
3+
export OCI_CID=<compartment_id>
4+
export OCICTL_HOME=<directory>/ocictl
5+
export OCICTL_CONFIG=$OCICTL_HOME/etc
6+
export PATH=$PATH:$OCICTL_HOME/sh

0 commit comments

Comments
 (0)