use of com.sequenceiq.cloudbreak.blueprint.filesystem.FileSystemScriptConfig in project cloudbreak by hortonworks.
the class GcsFileSystemConfigurator method getScriptConfigs.
@Override
protected List<FileSystemScriptConfig> getScriptConfigs(Credential credential, GcsFileSystemConfiguration fsConfig) {
Map<String, String> properties = Collections.singletonMap("P12KEY", getPrivateKey(credential));
List<FileSystemScriptConfig> fsScriptConfigs = new ArrayList<>();
fsScriptConfigs.add(new FileSystemScriptConfig("scripts/gcs-p12.sh", POST_AMBARI_START, ALL_NODES, properties));
fsScriptConfigs.add(new FileSystemScriptConfig("scripts/gcs-connector-local.sh", POST_AMBARI_START, ALL_NODES));
fsScriptConfigs.add(new FileSystemScriptConfig("scripts/gcs-connector-hdfs.sh", POST_CLUSTER_INSTALL, ONE_NODE));
return fsScriptConfigs;
}
use of com.sequenceiq.cloudbreak.blueprint.filesystem.FileSystemScriptConfig in project cloudbreak by hortonworks.
the class GcsFileSystemConfiguratorTest method testGetScriptConfigs.
@Test
public void testGetScriptConfigs() throws JsonProcessingException {
Credential credential = new Credential();
credential.setAttributes(new Json(singletonMap("serviceAccountPrivateKey", "private-key")));
GcsFileSystemConfiguration notProcessed = null;
List<FileSystemScriptConfig> actual = underTest.getScriptConfigs(credential, notProcessed);
List<FileSystemScriptConfig> expected = Arrays.asList(new FileSystemScriptConfig("scripts/gcs-p12.sh", POST_AMBARI_START, ALL_NODES, singletonMap("P12KEY", "private-key")), new FileSystemScriptConfig("scripts/gcs-connector-local.sh", POST_AMBARI_START, ALL_NODES), new FileSystemScriptConfig("scripts/gcs-connector-hdfs.sh", POST_CLUSTER_INSTALL, ONE_NODE));
Assert.assertEquals(expected, actual);
}
use of com.sequenceiq.cloudbreak.blueprint.filesystem.FileSystemScriptConfig in project cloudbreak by hortonworks.
the class GcsFileSystemConfiguratorTest method testGetScriptConfigsWhenPrivateKeyNotSet.
@Test
public void testGetScriptConfigsWhenPrivateKeyNotSet() throws JsonProcessingException {
Credential credential = new Credential();
credential.setAttributes(new Json(emptyMap()));
GcsFileSystemConfiguration notProcessed = null;
List<FileSystemScriptConfig> actual = underTest.getScriptConfigs(credential, notProcessed);
List<FileSystemScriptConfig> expected = Arrays.asList(new FileSystemScriptConfig("scripts/gcs-p12.sh", POST_AMBARI_START, ALL_NODES, singletonMap("P12KEY", "")), new FileSystemScriptConfig("scripts/gcs-connector-local.sh", POST_AMBARI_START, ALL_NODES), new FileSystemScriptConfig("scripts/gcs-connector-hdfs.sh", POST_CLUSTER_INSTALL, ONE_NODE));
Assert.assertEquals(expected, actual);
}
use of com.sequenceiq.cloudbreak.blueprint.filesystem.FileSystemScriptConfig in project cloudbreak by hortonworks.
the class WasbFileSystemConfiguratorTest method testGetScriptConfigs.
@Test
public void testGetScriptConfigs() {
List<FileSystemScriptConfig> actual = underTest.getScriptConfigs(new Credential(), new WasbFileSystemConfiguration());
Assert.assertEquals(emptyList(), actual);
}
Aggregations