@Override
public void setupMetadata(Stack stack) {
MDCBuilder.buildMdcContext(stack);
AzureCredential azureCredential = (AzureCredential) stack.getCredential();
String filePath = AzureCertificateService.getUserJksFileName(azureCredential, azureStackUtil.emailAsFolder(stack.getOwner()));
AzureClient azureClient = azureStackUtil.createAzureClient(azureCredential, filePath);
Set<CoreInstanceMetaData> instanceMetaDatas = collectMetaData(stack, azureClient);
LOGGER.info("Publishing {} event [StackId: '{}']", ReactorConfig.METADATA_SETUP_COMPLETE_EVENT, stack.getId());
reactor.notify(ReactorConfig.METADATA_SETUP_COMPLETE_EVENT,
Event.wrap(new MetadataSetupComplete(CloudPlatform.AZURE, stack.getId(), instanceMetaDatas)));
}