refs #2506 -- argument refactoring in Crear/Modificar imagen
parent
36ed2a0b5a
commit
7f6ec263e8
|
@ -106,7 +106,7 @@ def main():
|
|||
# repo = repositorio, oggit@server.com:/oggit
|
||||
# image = nombre repo
|
||||
|
||||
retval = create_image(args.disk, args.partition, args.repository, args.image_name, args.tag)
|
||||
retval = create_image(args.disk, args.partition, args.repository, args.image_name)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -116,27 +116,7 @@ def main():
|
|||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
|
||||
if len(sys.argv) != 7:
|
||||
import json
|
||||
args = json.dumps(sys.argv)
|
||||
sys.exit(SystemLib.ogRaiseError([], ogGlobals.OG_ERR_FORMAT, f"Incorrect number of arguments. Got {len(sys.argv)}. Usage: ModificarImagenGit.py disk_num partition_num repo new_branch options msg. Received args: {args}"))
|
||||
|
||||
# repo - repositorio, ip address. Opcional porque oglive lo recibe como parametro de kernel
|
||||
# tag - tag a crear automaticamente. Opcional, no necesitamos crear un tag siempre.
|
||||
|
||||
|
||||
disk_num, partition_num, repo, branch, options, msg = sys.argv[1:7]
|
||||
|
||||
print(f"Repo : {repo}")
|
||||
print(f"Branch : {branch}")
|
||||
print(f"Options: {options}")
|
||||
print(f"Msg : {msg}")
|
||||
|
||||
opengnsys_log_dir = "/opt/opengnsys/log"
|
||||
ip_address = NetLib.ogGetIpAddress()
|
||||
logFilePath = f"{opengnsys_log_dir}/{ip_address}.log"
|
||||
logFilePath = "/var/log/opengnsys.ModificarImagenGit.log"
|
||||
|
||||
ogLog = OgLogger()
|
||||
ogLog.setLevel(logging.DEBUG)
|
||||
|
@ -156,7 +136,7 @@ def main():
|
|||
logger.info("Starting ModificarImagenGit")
|
||||
|
||||
|
||||
retval = commit_image(disk_num, partition_num, repo, branch, options, msg)
|
||||
retval = commit_image(args.disk, args.partition, args.repository, args.branch, args.options, args.message)
|
||||
|
||||
|
||||
logger.info("ModificarImagenGit done, return code %i", retval)
|
||||
|
|
Loading…
Reference in New Issue