def step_impl(context, numOrgs, numPeers, numOrderers, numUsers): config_util.generateCryptoDir(context, numOrgs, numPeers, numOrderers, numUsers, tlsExist=True)
def add_org_impl(context, orgName, channelName): #Save original crypto.yaml file copyfile("./configs/{0}/crypto.yaml".format(context.projectName), "./configs/{0}/crypto_orig.yaml".format(context.projectName)) # Add cryptogen info for 3rd org config_util.buildCryptoFile(context, 1, 2, 0, 2, orgName=orgName) config_util.generateCrypto(context, "./configs/{0}/crypto.yaml".format(context.projectName)) config_util.generateCryptoDir(context, 1, 2, 0, 2, tlsExist=context.tlsEnabled, orgName=orgName) # Format the args for adding a new org with the orgName (TitleCase name and remove '.' for MSPID) # Example: org3.example.com (MSPID:Org3ExampleCom) update_impl(context, 'peer', channelName, args, userName='******')
def add_org_impl(context, orgMSP, channelName): configDir = "./configs/{0}".format(context.projectName) #Save original crypto.yaml file if os.path.exists("{0}/crypto.yaml".format(configDir)): copyfile("{0}/crypto.yaml".format(configDir), "{0}/crypto_orig.yaml".format(configDir)) # Add cryptogen info for 3rd org config_util.buildCryptoFile(context, 1, 2, 0, 2, orgMSP=orgMSP) config_util.generateCrypto(context, "{0}/crypto.yaml".format(configDir)) config_util.generateCryptoDir(context, 1, 2, 0, 2, tlsExist=context.tls, orgMSP=orgMSP) args = config_util.getNewOrg(context, orgMSP, channelName) updated_config = config_util.addNewOrg(context, args, "Application", channelName) update_impl(context, 'peer', channelName, updated_config, userName='******')