Exemplo n.º 1
0
def step_impl(context, enrollId, ccType, chaincodePath, ccSpecAlias):
    userRegistration = bdd_test_util.getUserRegistration(context, enrollId)
    args = bdd_grpc_util.getArgsFromContextForUser(context, enrollId)
    ccSpec = endorser_util.getChaincodeSpec(ccType, chaincodePath,
                                            bdd_grpc_util.toStringArray(args))
    print("ccSpec = {0}".format(ccSpec))
    userRegistration.tags[ccSpecAlias] = ccSpec
Exemplo n.º 2
0
def step_impl(context, userName, chaincodeInvocationSpecName,
              templateSpecName):
    directory = bootstrap_util.getDirectory(context=context)
    user = directory.getUser(userName)
    args = bootstrap_util.getArgsFromContextForUser(context, userName)
    template_chaincode_spec = user.tags[templateSpecName]
    cc_invocation_spec = endorser_util.getChaincodeSpecUsingTemplate(
        template_chaincode_spec=template_chaincode_spec,
        args=bdd_grpc_util.toStringArray(args))
    user.setTagValue(chaincodeInvocationSpecName, cc_invocation_spec)
Exemplo n.º 3
0
def step_impl(context, userName, ccType, chaincodeName, chaincodePath,
              ccSpecAlias):
    directory = bootstrap_util.getDirectory(context=context)
    user = directory.getUser(userName)
    args = bootstrap_util.getArgsFromContextForUser(context, userName)
    ccSpec = endorser_util.getChaincodeSpec(
        ccType=ccType,
        path=chaincodePath,
        name=chaincodeName,
        args=bdd_grpc_util.toStringArray(args))
    print("ccSpec = {0}".format(ccSpec))
    user.setTagValue(ccSpecAlias, ccSpec)
Exemplo n.º 4
0
def step_impl(context, userName, ccType, chaincodeName, chaincodePath, ccSpecAlias):
	directory = bootstrap_util.getDirectory(context=context)
	user = directory.getUser(userName)
	args =  bootstrap_util.getArgsFromContextForUser(context, userName)
	ccSpec = endorser_util.getChaincodeSpec(ccType=ccType, path=chaincodePath, name=chaincodeName, args=bdd_grpc_util.toStringArray(args))
	print("ccSpec = {0}".format(ccSpec))
	user.tags[ccSpecAlias] = ccSpec
Exemplo n.º 5
0
def step_impl(context, enrollId, ccType, chaincodePath, ccSpecAlias):
	userRegistration = bdd_test_util.getUserRegistration(context, enrollId)
	args =  bdd_grpc_util.getArgsFromContextForUser(context, enrollId)
	ccSpec = endorser_util.getChaincodeSpec(ccType, chaincodePath, bdd_grpc_util.toStringArray(args))
	print("ccSpec = {0}".format(ccSpec))
	userRegistration.tags[ccSpecAlias] = ccSpec
Exemplo n.º 6
0
def step_impl(context, userName, chaincodeInvocationSpecName, templateSpecName):
    directory = bootstrap_util.getDirectory(context=context)
    user = directory.getUser(userName)
    args =  bootstrap_util.getArgsFromContextForUser(context, userName)
    template_chaincode_spec = user.tags[templateSpecName]
    cc_invocation_spec =  endorser_util.getChaincodeSpecUsingTemplate(template_chaincode_spec=template_chaincode_spec, args=bdd_grpc_util.toStringArray(args))
    user.setTagValue(chaincodeInvocationSpecName, cc_invocation_spec)