Closed immarvin closed 5 years ago
Verified steps:
xwbj/backend_test_1
on githubxcat-inventory init
, got error working_dir
folder manually?git pull
in code, no branch at that time. So need to create master branch manually?
xcat-inventory commit
xcat-inventory push
---- will be merged into master?
If not, when checkout to mater will get error.
# xcat-inventory checkout master
checked out to revision master
Traceback (most recent call last):
File "/opt/xcat/lib/python/xcclient/inventory/shell.py", line 145, in main
InventoryShell('xcat-inventory','0.1.5 (git commit 5d47123272c02b90f270b1dcf62e9a72965f264e)').run(sys.argv[1:], '1.0', "xCAT inventory management tool")
File "/opt/xcat/lib/python/xcclient/shell.py", line 198, in run
return args.func(args)
File "/opt/xcat/lib/python/xcclient/inventory/shell.py", line 116, in do_checkout
mybackend.checkout(args.revision,args.doimport)
File "/opt/xcat/lib/python/xcclient/inventory/backend.py", line 349, in checkout
manager.importobj(None,".",None,None,None,None,False,None)
File "/opt/xcat/lib/python/xcclient/inventory/manager.py", line 659, in importobj
importfromdir(srcdir,myobjtype,objnamelist,dryrun,version,update,envs=envs)
File "/opt/xcat/lib/python/xcclient/inventory/manager.py", line 567, in importfromdir
hdl = InventoryFactory.createHandler(objtype,dbsession,version)
File "/opt/xcat/lib/python/xcclient/inventory/manager.py", line 52, in createHandler
schemaversion=InventoryFactory.getValidSchemaVersion(objtype)
File "/opt/xcat/lib/python/xcclient/inventory/manager.py", line 82, in getValidSchemaVersion
schemapath=os.path.join(os.path.dirname(__file__), 'schema/'+str(ver)+'/'+objtype+'.yaml')
TypeError: cannot concatenate 'str' and 'NoneType' objects
xcat-inventory pull
xcat-inventory workspace-new/list/delete/checkout
Whether need to config user.name
and user.email
?
UT Result by test cases: xcattest.log.20181229094600.txt
based on https://github.com/xcat2/xcat-inventory/issues/90 newly added backend subcommands:
on
xcat-inventory checkout <rev>
, a temp branch<rev>@<branch>
will be created in backend giton in
xcat-inventory commit <revision> -m <revision description>
, a tag<revision>#<branch>
will be generated in current branch in backend git, need to process the conversion of git tag and thecommit
,checkout
,rev-list