Commit 3fe14fa1 authored by Lu Xu's avatar Lu Xu 👀

wip

parent 78f6defe
......@@ -36,7 +36,7 @@ md5sum = b34fe47a73890097fbc6ea6374aeb38d
[lopcomm-rrh-software.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-software.jinja2.py
md5sum = 2a5c10fde0066a959be00ff1ced29bef
md5sum = a0387f81cbefec87429b119b429148b4
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
......
......@@ -57,30 +57,6 @@ class LopcommNetconfClient:
self.logger.error('Error sending custom RPC request: %s' % response.error)
except RPCError as e:
self.logger.error('Error sending custom RPC request: %s' % e)
# def rpc_request(self, rpc_files):
# for rpc_file in rpc_files:
# with open(rpc_file) as f:
# rpc_xml = f.read()
#
# try:
# self.logger.info('Sending software management RPC request...')
# rpc_obj = RPC(rpc_xml, self.conn)
# rpc_obj.send()
# self.logger.info('Software management RPC request sent successfully')
# except RPCError as e:
# self.logger.error('Error sending software management RPC request: %s' % e)
#
# def rpc_request(self, rpc_files):
# for rpc_file in rpc_files:
# with open(rpc_file) as f:
# rpc_xml = f.read()
#
# try:
# self.logger.info('Sending software management RPC request...')
# self.conn.rpc(target='running', config=rpc_xml)
# self.logger.info('Software management RPC request sent successfully')
# except RPCError as e:
# self.logger.error('Error sending software management RPC request: %s' % e)
def close(self):
# Close not compatible between ncclient and netconf server
......@@ -98,10 +74,6 @@ if __name__ == '__main__':
<slot-name>slot-1</slot-name>
<file-names>PR.PRM61C70V1002.K010927.tar.g</file-names>
</software-install>
<software-install xmlns="urn:o-ran:software-management:1.0">
<slot-name>slot-2</slot-name>
<file-names>PR.PRM61C70V1002.K010927.tar.g</file-names>
</software-install>
"""
nc.custom_rpc_request(custom_rpc_xml)
......@@ -112,16 +84,3 @@ if __name__ == '__main__':
time.sleep(10)
finally:
nc.close()
#if __name__ == '__main__':
# nc = LopcommNetconfClient()
# while True:
# try:
# nc.connect("{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}", 830, "oranuser", "oranpassword")
# nc.rpc_request(["{{ software_install_template }}"])
# break
# except Exception as e:
# nc.logger.debug('Got exception, waiting 10 seconds before reconnecting...')
# nc.logger.debug(e)
# time.sleep(10)
# finally:
# nc.close()
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