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

wip

parent 4bc14c73
...@@ -36,7 +36,7 @@ md5sum = b34fe47a73890097fbc6ea6374aeb38d ...@@ -36,7 +36,7 @@ md5sum = b34fe47a73890097fbc6ea6374aeb38d
[lopcomm-rrh-software.jinja2.py] [lopcomm-rrh-software.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-software.jinja2.py _update_hash_filename_ = lopcomm-rrh-software.jinja2.py
md5sum = a41653f586ce17c2d77ef1b0fb86b8a4 md5sum = fa560d4e694a1cab986e09807a7a060f
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
......
...@@ -53,11 +53,24 @@ class LopcommNetconfClient: ...@@ -53,11 +53,24 @@ class LopcommNetconfClient:
try: try:
self.logger.info('Sending software management RPC request...') self.logger.info('Sending software management RPC request...')
self.conn.rpc(target='running', config=rpc_xml) rpc_obj = RPC(rpc_xml, self.conn)
rpc_obj.send()
self.logger.info('Software management RPC request sent successfully') self.logger.info('Software management RPC request sent successfully')
except RPCError as e: except RPCError as e:
self.logger.error('Error sending software management RPC request: %s' % 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): def close(self):
# Close not compatible between ncclient and netconf server # Close not compatible between ncclient and netconf server
#self.conn.close() #self.conn.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