Exemple #1
0
def generateDeploymentPod(orgs, yamlContent):
    for org in orgs:
        if org.find("peer") != -1:  #whether it create orderer pod or peer pod
            suffix = "/peers"
        else:
            suffix = "/orderers"
        members = os.listdir(org + suffix)
        offset = orgs.index(org)
        for member in members:
            memberDIR = os.path.join(org + suffix, member)
            tc.generateYaml(member, memberDIR, suffix, offset, yamlContent)
Exemple #2
0
def generateDeploymentPod(orgs):
	for org in orgs:

		if org.find("peer") != -1: #whether it create orderer pod or peer pod
			suffix = "/peers"
		else:
			suffix = "/orderers"

		members = os.listdir(org + suffix)
		for member in members:
			#print(member)
			memberDIR = os.path.join(org + suffix, member)
			#print(memberDIR)
			#print(os.listdir(memberDIR))
			tc.generateYaml(member,memberDIR, suffix)
def generateDeploymentPod(orgs, override, all_volumes, ex_ports, nfs):
    for orgindex, org in enumerate(orgs):

        if org.find("peer") != -1:  # whether it create orderer pod or peer pod
            suffix = "/peers"
        else:
            suffix = "/orderers"

        members = sorted(os.listdir(org + suffix))
        for nodeindex, member in enumerate(members):
            print(member)
            memberDIR = os.path.join(org + suffix, member)
            # print(memberDIR)
            # print(os.listdir(memberDIR))
            tc.generateYaml(member, memberDIR, suffix, override, orgindex, nodeindex, all_volumes, ex_ports, nfs)
def generateDeploymentPod(dir, name, domain):

    if dir.find("peer") != -1:  #whether it create orderer pod or peer pod
        suffix = "/peers"
    else:
        suffix = "/orderers"

    memberdir = dir + '/' + domain + suffix
    members = os.listdir(memberdir)
    for member in members:
        print('in generateDeploymentPod, member is: ' + str(member))
        memberDIR = os.path.join(memberdir, member)
        print('in generateDeploymentPod, member directory is: ' +
              str(memberDIR))
        print('in generateDeploymentPod, member directory listing is: ' +
              str(os.listdir(memberDIR)))
        tc.generateYaml(member, memberDIR, suffix, domain)