Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tcnieh committed Jul 15, 2020
1 parent aa3b954 commit e9d3244
Show file tree
Hide file tree
Showing 63 changed files with 28,628 additions and 0 deletions.
282 changes: 282 additions & 0 deletions 5gc_oam/.viminfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
# This viminfo file was generated by Vim 8.0.
# You may edit it if you're careful!

# Viminfo version
|1,4

# Value of 'encoding' when this file was written
*encoding=utf-8


# hlsearch on (H) or off (h):
~h
# Last Search Pattern:
~MSle0~/prin

# Command Line History (newest to oldest):
:wq
|2,0,1594837366,,"wq"

# Search String History (newest to oldest):
?/prin
|2,1,1594837356,47,"prin"
?/pir
|2,1,1594836269,47,"pir"

# Expression History (newest to oldest):

# Input Line History (newest to oldest):

# Debug Line History (newest to oldest):

# Registers:
"0 LINE 0
prinf("keyI->", keyI)
|3,0,0,1,1,0,1594836934," prinf(\"keyI->\", keyI)"
""1 LINE 0
print("3keyI->", keyI)
|3,1,1,1,1,0,1594837364," print(\"3keyI->\", keyI)"
"2 LINE 0
print("3key->", key)
|3,0,2,1,1,0,1594837364," print(\"3key->\", key)"
"3 LINE 0
print("1keyI->", keyI)
|3,0,3,1,1,0,1594837359," print(\"1keyI->\", keyI)"
"4 LINE 0
print("1key->", key)
|3,0,4,1,1,0,1594837359," print(\"1key->\", key)"
"5 LINE 0
print("2keyI->", keyI)
|3,0,5,1,1,0,1594837357," print(\"2keyI->\", keyI)"
"6 LINE 0
print("2key->", key)
|3,0,6,1,1,0,1594837357," print(\"2key->\", key)"
"7 LINE 0

|3,0,7,1,1,0,1594836932," "
"8 LINE 0
return True
|3,0,8,1,1,0,1594836882," return True"
"9 LINE 0
if ('op' == key or 'opc' == key):
|3,0,9,1,1,0,1594836881," if ('op' == key or 'opc' == key):"
"- CHAR 0
f
|3,0,36,0,1,0,1594836986,"f"

# File marks:
'0 119 16 ~/configReadWrite.py
|4,48,119,16,1594837366,"~/configReadWrite.py"
'1 112 39 ~/configReadWrite.py
|4,49,112,39,1594837268,"~/configReadWrite.py"
'2 114 39 ~/configReadWrite.py
|4,50,114,39,1594837268,"~/configReadWrite.py"
'3 113 27 ~/configReadWrite.py
|4,51,113,27,1594837142,"~/configReadWrite.py"
'4 112 27 ~/configReadWrite.py
|4,52,112,27,1594837142,"~/configReadWrite.py"
'5 115 27 ~/configReadWrite.py
|4,53,115,27,1594837142,"~/configReadWrite.py"
'6 114 27 ~/configReadWrite.py
|4,54,114,27,1594837142,"~/configReadWrite.py"
'7 99 12 ~/configReadWrite.py
|4,55,99,12,1594837003,"~/configReadWrite.py"
'8 99 12 ~/configReadWrite.py
|4,56,99,12,1594837003,"~/configReadWrite.py"
'9 99 12 ~/configReadWrite.py
|4,57,99,12,1594837003,"~/configReadWrite.py"

# Jumplist (newest first):
-' 119 16 ~/configReadWrite.py
|4,39,119,16,1594837366,"~/configReadWrite.py"
-' 112 39 ~/configReadWrite.py
|4,39,112,39,1594837356,"~/configReadWrite.py"
-' 114 39 ~/configReadWrite.py
|4,39,114,39,1594837268,"~/configReadWrite.py"
-' 113 27 ~/configReadWrite.py
|4,39,113,27,1594837204,"~/configReadWrite.py"
-' 115 27 ~/configReadWrite.py
|4,39,115,27,1594837204,"~/configReadWrite.py"
-' 114 27 ~/configReadWrite.py
|4,39,114,27,1594837142,"~/configReadWrite.py"
-' 99 12 ~/configReadWrite.py
|4,39,99,12,1594837067,"~/configReadWrite.py"
-' 100 12 ~/configReadWrite.py
|4,39,100,12,1594837067,"~/configReadWrite.py"
-' 100 12 ~/configReadWrite.py
|4,39,100,12,1594837067,"~/configReadWrite.py"
-' 100 12 ~/configReadWrite.py
|4,39,100,12,1594837003,"~/configReadWrite.py"
-' 118 15 ~/configReadWrite.py
|4,39,118,15,1594836982,"~/configReadWrite.py"
-' 117 15 ~/configReadWrite.py
|4,39,117,15,1594836982,"~/configReadWrite.py"
-' 124 15 ~/configReadWrite.py
|4,39,124,15,1594836982,"~/configReadWrite.py"
-' 122 15 ~/configReadWrite.py
|4,39,122,15,1594836982,"~/configReadWrite.py"
-' 123 15 ~/configReadWrite.py
|4,39,123,15,1594836982,"~/configReadWrite.py"
-' 121 15 ~/configReadWrite.py
|4,39,121,15,1594836982,"~/configReadWrite.py"
-' 121 15 ~/configReadWrite.py
|4,39,121,15,1594836941,"~/configReadWrite.py"
-' 100 27 ~/configReadWrite.py
|4,39,100,27,1594836790,"~/configReadWrite.py"
-' 100 27 ~/configReadWrite.py
|4,39,100,27,1594836777,"~/configReadWrite.py"
-' 93 4 ~/configReadWrite.py
|4,39,93,4,1594836742,"~/configReadWrite.py"
-' 93 4 ~/configReadWrite.py
|4,39,93,4,1594836742,"~/configReadWrite.py"
-' 93 4 ~/configReadWrite.py
|4,39,93,4,1594836742,"~/configReadWrite.py"
-' 93 4 ~/configReadWrite.py
|4,39,93,4,1594836742,"~/configReadWrite.py"
-' 93 4 ~/configReadWrite.py
|4,39,93,4,1594836742,"~/configReadWrite.py"
-' 93 4 ~/configReadWrite.py
|4,39,93,4,1594836742,"~/configReadWrite.py"
-' 93 4 ~/configReadWrite.py
|4,39,93,4,1594836708,"~/configReadWrite.py"
-' 105 16 ~/configReadWrite.py
|4,39,105,16,1594836462,"~/configReadWrite.py"
-' 103 16 ~/configReadWrite.py
|4,39,103,16,1594836462,"~/configReadWrite.py"
-' 107 16 ~/configReadWrite.py
|4,39,107,16,1594836462,"~/configReadWrite.py"
-' 105 16 ~/configReadWrite.py
|4,39,105,16,1594836462,"~/configReadWrite.py"
-' 107 16 ~/configReadWrite.py
|4,39,107,16,1594836462,"~/configReadWrite.py"
-' 105 16 ~/configReadWrite.py
|4,39,105,16,1594836462,"~/configReadWrite.py"
-' 107 16 ~/configReadWrite.py
|4,39,107,16,1594836462,"~/configReadWrite.py"
-' 105 16 ~/configReadWrite.py
|4,39,105,16,1594836462,"~/configReadWrite.py"
-' 107 16 ~/configReadWrite.py
|4,39,107,16,1594836462,"~/configReadWrite.py"
-' 105 16 ~/configReadWrite.py
|4,39,105,16,1594836462,"~/configReadWrite.py"
-' 107 16 ~/configReadWrite.py
|4,39,107,16,1594836462,"~/configReadWrite.py"
-' 105 16 ~/configReadWrite.py
|4,39,105,16,1594836462,"~/configReadWrite.py"
-' 108 16 ~/configReadWrite.py
|4,39,108,16,1594836398,"~/configReadWrite.py"
-' 106 16 ~/configReadWrite.py
|4,39,106,16,1594836398,"~/configReadWrite.py"
-' 110 16 ~/configReadWrite.py
|4,39,110,16,1594836398,"~/configReadWrite.py"
-' 108 16 ~/configReadWrite.py
|4,39,108,16,1594836398,"~/configReadWrite.py"
-' 110 16 ~/configReadWrite.py
|4,39,110,16,1594836398,"~/configReadWrite.py"
-' 108 16 ~/configReadWrite.py
|4,39,108,16,1594836398,"~/configReadWrite.py"
-' 110 16 ~/configReadWrite.py
|4,39,110,16,1594836398,"~/configReadWrite.py"
-' 108 16 ~/configReadWrite.py
|4,39,108,16,1594836398,"~/configReadWrite.py"
-' 110 16 ~/configReadWrite.py
|4,39,110,16,1594836398,"~/configReadWrite.py"
-' 108 16 ~/configReadWrite.py
|4,39,108,16,1594836398,"~/configReadWrite.py"
-' 110 16 ~/configReadWrite.py
|4,39,110,16,1594836398,"~/configReadWrite.py"
-' 108 16 ~/configReadWrite.py
|4,39,108,16,1594836398,"~/configReadWrite.py"
-' 104 18 ~/configReadWrite.py
|4,39,104,18,1594836274,"~/configReadWrite.py"
-' 107 18 ~/configReadWrite.py
|4,39,107,18,1594836274,"~/configReadWrite.py"
-' 102 18 ~/configReadWrite.py
|4,39,102,18,1594836274,"~/configReadWrite.py"
-' 106 18 ~/configReadWrite.py
|4,39,106,18,1594836274,"~/configReadWrite.py"
-' 109 18 ~/configReadWrite.py
|4,39,109,18,1594836274,"~/configReadWrite.py"
-' 104 18 ~/configReadWrite.py
|4,39,104,18,1594836274,"~/configReadWrite.py"
-' 106 18 ~/configReadWrite.py
|4,39,106,18,1594836274,"~/configReadWrite.py"
-' 109 18 ~/configReadWrite.py
|4,39,109,18,1594836274,"~/configReadWrite.py"
-' 104 18 ~/configReadWrite.py
|4,39,104,18,1594836274,"~/configReadWrite.py"
-' 106 18 ~/configReadWrite.py
|4,39,106,18,1594836274,"~/configReadWrite.py"
-' 109 18 ~/configReadWrite.py
|4,39,109,18,1594836274,"~/configReadWrite.py"
-' 104 18 ~/configReadWrite.py
|4,39,104,18,1594836274,"~/configReadWrite.py"
-' 106 18 ~/configReadWrite.py
|4,39,106,18,1594836274,"~/configReadWrite.py"
-' 109 18 ~/configReadWrite.py
|4,39,109,18,1594836274,"~/configReadWrite.py"
-' 104 18 ~/configReadWrite.py
|4,39,104,18,1594836274,"~/configReadWrite.py"
-' 106 18 ~/configReadWrite.py
|4,39,106,18,1594836274,"~/configReadWrite.py"
-' 109 18 ~/configReadWrite.py
|4,39,109,18,1594836274,"~/configReadWrite.py"
-' 104 18 ~/configReadWrite.py
|4,39,104,18,1594836274,"~/configReadWrite.py"
-' 107 18 ~/configReadWrite.py
|4,39,107,18,1594836274,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"
-' 1 0 ~/configReadWrite.py
|4,39,1,0,1594836269,"~/configReadWrite.py"

# History of marks within files (newest to oldest):

> ~/configReadWrite.py
* 1594837365 0
" 119 16
^ 112 40
. 119 0
+ 105 18
+ 99 8
+ 105 0
+ 110 33
+ 114 48
+ 114 30
+ 99 0
+ 93 0
+ 99 25
+ 99 27
+ 114 0
+ 116 11
+ 119 15
+ 119 10
+ 119 9
+ 119 0
+ 119 15
+ 119 20
+ 116 16
+ 99 12
+ 99 15
+ 116 19
+ 119 23
+ 111 47
+ 113 27
+ 112 39
+ 116 0
+ 99 0
+ 119 0
2 changes: 2 additions & 0 deletions 5gc_oam/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 5GC_OAM

66 changes: 66 additions & 0 deletions 5gc_oam/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
from flask import Flask, request, render_template, redirect, url_for
import io, libconf
import configReadWrite, dockerCommand

app = Flask(__name__)

layout = ''
config = ''
containers = ''

with io.open('conf/all.conf') as f:
config = libconf.load(f)

with io.open('conf/param.conf') as f:
layout = libconf.load(f)

with io.open('conf/component.conf') as f:
containers = libconf.load(f)
configReadWrite.syncNfAddr(config, containers)

def modifyAllStatus(status):
global containers

for key in containers:
modifyStatus(key, status)

def modifyStatus(target, status):
global containers

if 'stop' == status:
dockerCommand.rmContainer(containers, target)
else:
dockerCommand.runContainer(containers, target)

containers[target]['status'] = status

@app.route('/oam/edit', methods=['GET', 'POST'])
def confpage():
if 'POST' == request.method:
configReadWrite.storeConfig(layout=layout, config=config, data=request.form)
configReadWrite.writeConfig(config, 'conf/all.conf')
configReadWrite.genNfConf(config, containers)

return redirect(url_for('homepage'))
return render_template("editConfig.html", layout=layout, config=config)

@app.route('/oam/container', methods=['POST'])
def containerpage():
if 'POST' == request.method:
for key, value in request.form.items():
if 'all' == key:
modifyAllStatus(value)
else:
modifyStatus(key, value)
return redirect(url_for('homepage'))

@app.route('/oam/', methods=['GET'])
def homepage():
return render_template("showConfig.html", layout=layout, config=config, containers=containers)

@app.route('/oam/test', methods=['GET'])
def test():
return render_template("test.html")

if __name__ == "__main__":
app.run()
Binary file not shown.
Binary file added 5gc_oam/__pycache__/dockerCommand.cpython-36.pyc
Binary file not shown.
21 changes: 21 additions & 0 deletions 5gc_oam/conf/Quagga.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
!
hostname Router
!password zebra
!enable password zebra
!
! Interface's description.
!
!interface lo
! description test of desc.
!
!interface sit0
! multicast

!
! Static default route sample.
!
!ip route 0.0.0.0/0 203.181.89.241
!

!log file zebra.log

Loading

0 comments on commit e9d3244

Please sign in to comment.