Skip to content

Commit

Permalink
File inject fix (#642)
Browse files Browse the repository at this point in the history
* update git-ignore

* Convert byte to string for personality file

* Up the test coverage to 25%

(cherry picked from commit ce5c387)
  • Loading branch information
Arvind Nadendla committed Feb 7, 2018
1 parent cd92f3d commit 2b51c61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ coverage:
project:
default:
enabled: yes
target: 24%
target: 25%
threshold: 1%
base: parent
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.osc.core.broker.rest.client.openstack.openstack4j;

import java.io.IOException;
import java.util.Arrays;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.Map;
Expand All @@ -38,10 +38,10 @@
import org.openstack4j.model.compute.ext.Hypervisor;
import org.openstack4j.model.identity.v3.Region;
import org.openstack4j.model.network.Port;
import org.slf4j.LoggerFactory;
import org.osc.sdk.manager.element.ApplianceBootstrapInformationElement;
import org.osc.sdk.manager.element.ApplianceBootstrapInformationElement.BootstrapFileElement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.collect.Maps;

Expand Down Expand Up @@ -131,7 +131,7 @@ public CreatedServerDetails createServer(String region, String availabilityZone,
}

for (BootstrapFileElement file : bootstrapInfo.getBootstrapFiles()) {
sc.addPersonality(file.getName(), Arrays.toString(file.getContent()));
sc.addPersonality(file.getName(), new String(file.getContent(), StandardCharsets.UTF_8));
}
sc.configDrive(true);

Expand Down

0 comments on commit 2b51c61

Please sign in to comment.