Upgrading Jetty module software
3. To check the upgrade status, run python gnoi_client.py upgrade-status.
Example:
Contents of file gnoi_client.py:
import logging
import grpc
import system_pb2
import system_pb2_grpc
import time
import sys
def run():
with grpc.insecure_channel('200.207.77.21:50051') as channel:
stub = system_pb2_grpc.SystemStub(channel)
try:
_t = sys.argv[1]
except IndexError:
print("prog upgrade httP://url")
print("prog upgrade-status")
return
result = ""
#uri="http://10.40.1.188/release-compose/nsg-run-compose/compose/info/
exor-device/RPD_PEBBLEX/1.25.0.1-PEBBLEX.54+auto36/results/ExoR-release-1.25.0.1-
PEBBLEX.54+auto36.iso.codefile"
if sys.argv[1] == "upgrade":
try:
uri = sys.argv[2]
except IndexError:
print("prog upgrade httP://url")
return
response = stub.Upgrade(system_pb2.UpgradeRequest(
uri=uri,
delay = 1000,
#reboot = True,
#force = True,
))
result = response
elif sys.argv[1] == "upgrade-status":
response = stub.UpgradeStatus(system_pb2.UpgradeStatusRequest())
result = response
else:
pass
print("Client received:")
print(result)
if __name__ == '__main__':
logging.basicConfig()
run()
#protos, services = grpc.protos_and_services("system.proto")
#response = services.System.Upgrade(protos.UpgradeRequest(uri='http://
test.me:9090/aaa'),
# 'localhost:50051', insecure=True)
71 Installation Guide