Search in sources :

Example 1 with MatchingConfigurations

use of alien4cloud.deployment.matching.services.nodes.MatchingConfigurations in project yorc-a4c-plugin by ystia.

the class AbstractLocationConfigurer method getMatchingConfigurations.

public Map<String, MatchingConfiguration> getMatchingConfigurations(String matchingConfigRelativePath) {
    Path matchingConfigPath = selfContext.getPluginPath().resolve(matchingConfigRelativePath);
    MatchingConfigurations matchingConfigurations = null;
    try {
        matchingConfigurations = matchingConfigurationsParser.parseFile(matchingConfigPath).getResult();
    } catch (ParsingException e) {
        return Maps.newHashMap();
    }
    Map<String, MatchingConfiguration> ret = matchingConfigurations.getMatchingConfigurations();
    printMatchingConfigurations(ret);
    return ret;
}
Also used : Path(java.nio.file.Path) MatchingConfigurations(alien4cloud.deployment.matching.services.nodes.MatchingConfigurations) MatchingConfiguration(alien4cloud.model.deployment.matching.MatchingConfiguration) ParsingException(alien4cloud.tosca.parser.ParsingException)

Example 2 with MatchingConfigurations

use of alien4cloud.deployment.matching.services.nodes.MatchingConfigurations in project alien4cloud by alien4cloud.

the class MockOpenStackLocationConfigurer method getMatchingConfigurations.

@Override
public Map<String, MatchingConfiguration> getMatchingConfigurations() {
    Path matchingConfigPath = selfContext.getPluginPath().resolve("openstack/mock-resources-matching-config.yml");
    MatchingConfigurations matchingConfigurations = null;
    try {
        matchingConfigurations = matchingConfigurationsParser.parseFile(matchingConfigPath).getResult();
    } catch (ParsingException e) {
        return Maps.newHashMap();
    }
    return matchingConfigurations.getMatchingConfigurations();
}
Also used : Path(java.nio.file.Path) MatchingConfigurations(alien4cloud.deployment.matching.services.nodes.MatchingConfigurations) ParsingException(alien4cloud.tosca.parser.ParsingException)

Example 3 with MatchingConfigurations

use of alien4cloud.deployment.matching.services.nodes.MatchingConfigurations in project alien4cloud by alien4cloud.

the class MockAmazonLocationConfigurer method getMatchingConfigurations.

@Override
public Map<String, MatchingConfiguration> getMatchingConfigurations() {
    Path matchingConfigPath = selfContext.getPluginPath().resolve("aws/mock-resources-matching-config.yml");
    MatchingConfigurations matchingConfigurations = null;
    try {
        matchingConfigurations = matchingConfigurationsParser.parseFile(matchingConfigPath).getResult();
    } catch (ParsingException e) {
        return Maps.newHashMap();
    }
    return matchingConfigurations.getMatchingConfigurations();
}
Also used : Path(java.nio.file.Path) MatchingConfigurations(alien4cloud.deployment.matching.services.nodes.MatchingConfigurations) ParsingException(alien4cloud.tosca.parser.ParsingException)

Aggregations

MatchingConfigurations (alien4cloud.deployment.matching.services.nodes.MatchingConfigurations)3 ParsingException (alien4cloud.tosca.parser.ParsingException)3 Path (java.nio.file.Path)3 MatchingConfiguration (alien4cloud.model.deployment.matching.MatchingConfiguration)1