in src/resourceExplorers/ConsortiumResourceExplorer.ts [128:173]
public async createAzureConsortium(
azureClient: AzureBlockchainServiceClient,
subscriptionItem: SubscriptionItem,
certainLocation?: string[])
: Promise<AzureBlockchainProject> {
const consortiumName = await this.getConsortiumName(azureClient);
const memberName = await this.getConsortiumMemberName(azureClient);
const protocol = await this.getOrSelectConsortiumProtocol();
const memberPassword = await this.getConsortiumMemberPassword();
const consortiumPassword = await this.getConsortiumPassword();
const region = await this.getOrSelectLocationItem(subscriptionItem, certainLocation);
const sku = await this.getOrSelectSku(azureClient, region);
const bodyParams: ICreateQuorumMember = {
consortiumManagementAccountPassword: memberPassword,
consortiumName,
consortiumPassword,
protocol,
region: region.description,
sku: {
name: sku.description,
tier: sku.label,
},
};
return window.withProgress({
location: ProgressLocation.Window,
title: Constants.statusBarMessages.creatingConsortium,
}, async () => {
await this.createConsortium(azureClient, memberName, bodyParams);
const subscriptionId = azureClient.subscriptionId;
const resourceGroup = azureClient.resourceGroup;
const azureMember = new Member(memberName);
const defaultNetworkNode = this.getTransactionNetworkNode(memberName, subscriptionId, resourceGroup, memberName);
azureMember.setChildren([defaultNetworkNode]);
const azureConsortium = new AzureBlockchainProject(consortiumName, subscriptionId, resourceGroup, [memberName]);
await azureConsortium.setChildren([azureMember]);
return azureConsortium;
});
}