Commit 33c89488 authored by Joanne Hugé's avatar Joanne Hugé

WIP

parent 9a37418c
......@@ -24,7 +24,7 @@ md5sum = 6e0a052bd0ca08cc0c7b4880d3deffcc
[lopcomm-rrh-stats.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-stats.jinja2.py
md5sum = 00439dde2f13ec427044cd94a0eee743
md5sum = 5006bf564f480bd9db7d515a414fc082
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
......@@ -64,7 +64,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = 4083d0d21be98eecc8cdef3fb575a721
md5sum = 4268e6e595f620e1e2f8ac94a9d9efe5
[sib23.asn]
filename = config/sib23.asn
......
......@@ -16,6 +16,7 @@
cpri_rx_delay: 0,
cpri_tx_delay: 0,
ifname: "cpri0",
ifname: "{{ slap_configuration.get('tap-name', '') }}",
},
tx_gain: 0,
rx_gain: 0,
......
......@@ -24,7 +24,7 @@ class LopcommNetconfClient:
if {{ testing }}:
return
def connect(host, port, user, password):
def connect(self, host, port, user, password):
if {{ testing }}:
return
......@@ -47,20 +47,14 @@ class LopcommNetconfClient:
result_in_xml = result._raw
data_dict = xmltodict.parse(result_in_xml)
result_in_json = json.dumps(data_dict)
print(result_in_json)
self.logger.info('', extra={'data': result_in_json})
if __name__ == '__main__':
#LOG_FORMAT = '%(asctime)s %(levelname)s %(filename)s:%(lineno)d %(message)s'
#logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=LOG_FORMAT)
#logging.getLogger().setLevel(logging.DEBUG)
connect("192.168.0.210", 830, "oranuser", "oranpassword")
nc = LopcommNetconfClient()
while True:
try:
nc.connect()
nc.connect("192.168.0.210", 830, "oranuser", "oranpassword")
time.sleep(10)
except Exception as e:
nc.logger.debug(e)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment