Skip to content
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public String authenticateConsoleAccess(String host, String port, String vmId, S
result.setTunnelUrl(authAnswer.getTunnelUrl());
result.setTunnelSession(authAnswer.getTunnelSession());
} else {
logger.error("Authentication failed for vm: {} with sid: {}", vmId, sid);
logger.error("Authentication failed for Instance: {} with sid: {}", vmId, sid);
}
} catch (AgentControlChannelException e) {
logger.error("Unable to send out console access authentication request due to {}", e.getMessage(), e);
Expand Down
28 changes: 14 additions & 14 deletions api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ private DatadiskTO generateDiskTO(OVFFile file, OVFDisk disk, String ovfParentPa
if (StringUtils.isNotBlank(path)) {
File f = new File(path);
if (!f.exists() || f.isDirectory()) {
logger.error("One of the attached disk or iso does not exists " + path);
throw new InternalErrorException("One of the attached disk or iso as stated on OVF does not exists " + path);
logger.error("One of the attached disk or ISO does not exists " + path);
throw new InternalErrorException("One of the attached disk or ISO as stated on OVF does not exists " + path);
}
}
Long capacity = disk != null ? disk._capacity : file._size;
Expand Down Expand Up @@ -335,7 +335,7 @@ protected List<OVFDisk> extractDisksFromOvfDocumentTree(Document doc) {
vd.add(od);
}
if (logger.isTraceEnabled()) {
logger.trace(String.format("found %d disk definitions",vd.size()));
logger.trace(String.format("Found %d disk definitions", vd.size()));
}
return vd;
}
Expand Down Expand Up @@ -367,7 +367,7 @@ protected List<OVFFile> extractFilesFromOvfDocumentTree(File ovfFile, Document d
}
}
if (logger.isTraceEnabled()) {
logger.trace(String.format("found %d file definitions in %s",vf.size(), ovfFile.getPath()));
logger.trace(String.format("Found %d file definitions in %s", vf.size(), ovfFile.getPath()));
}
return vf;
}
Expand Down Expand Up @@ -506,7 +506,7 @@ private void writeDocumentToFile(String newOvfFilePath, Document doc) {
outfile.write(writer.toString());
outfile.close();
} catch (IOException | TransformerException e) {
logger.info("Unexpected exception caught while rewriting OVF:" + e.getMessage(), e);
logger.info("Unexpected exception caught while rewriting OVF: {}", e.getMessage(), e);
throw new CloudRuntimeException(e);
}
}
Expand All @@ -523,7 +523,7 @@ OVFFile getFileDefinitionFromDiskDefinition(String fileRef, List<OVFFile> files)
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
if (doc == null) {
if (logger.isTraceEnabled()) {
logger.trace("no document to parse; returning no prerequisite networks");
logger.trace("No document to parse; returning no prerequisite Networks");
}
return Collections.emptyList();
}
Expand All @@ -541,7 +541,7 @@ private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement)
final DocumentTraversal traversal = (DocumentTraversal) systemElement;
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
if (logger.isTraceEnabled()) {
logger.trace(String.format("starting out with %d network-prerequisites, parsing hardware",nets.size()));
logger.trace(String.format("Starting out with %d network-prerequisites, parsing hardware",nets.size()));
}
int nicCount = 0;
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
Expand All @@ -551,7 +551,7 @@ private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement)
String name = e.getTextContent(); // should be in our nets
if(nets.get(name) == null) {
if(logger.isInfoEnabled()) {
logger.info(String.format("found a nic definition without a network definition byname %s, adding it to the list.", name));
logger.info(String.format("Found a NIC definition without a Network definition by name %s, adding it to the list.", name));
}
nets.put(name, new OVFNetworkTO());
}
Expand All @@ -562,7 +562,7 @@ private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement)
}
}
if (logger.isTraceEnabled()) {
logger.trace(String.format("ending up with %d network-prerequisites, parsed %d nics", nets.size(), nicCount));
logger.trace(String.format("Ending up with %d network-prerequisites, parsed %d NICs", nets.size(), nicCount));
}
}

Expand All @@ -585,7 +585,7 @@ private void fillNicPrerequisites(OVFNetworkTO nic, Node parentNode) {
int addressOnParent = Integer.parseInt(addressOnParentStr);
nic.setAddressOnParent(addressOnParent);
} catch (NumberFormatException e) {
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: " + addressOnParentStr);
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: {}", addressOnParentStr);
}

boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr);
Expand All @@ -597,7 +597,7 @@ private void fillNicPrerequisites(OVFNetworkTO nic, Node parentNode) {
int instanceId = Integer.parseInt(instanceIdStr);
nic.setInstanceID(instanceId);
} catch (NumberFormatException e) {
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: " + instanceIdStr);
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: {}", instanceIdStr);
}

nic.setResourceSubType(resourceSubType);
Expand Down Expand Up @@ -631,7 +631,7 @@ private Map<String, OVFNetworkTO> getNetworksFromDocumentTree(Document doc) {
nets.put(networkName,network);
}
if (logger.isTraceEnabled()) {
logger.trace(String.format("found %d networks in template", nets.size()));
logger.trace(String.format("Found %d Networks in Template", nets.size()));
}
return nets;
}
Expand Down Expand Up @@ -771,7 +771,7 @@ private Long getLongValueFromString(String value) {
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
logger.debug("Could not parse the value: " + value + ", ignoring it");
logger.debug("Could not parse the value: {}, ignoring it", value);
}
}
return null;
Expand All @@ -782,7 +782,7 @@ private Integer getIntValueFromString(String value) {
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
logger.debug("Could not parse the value: " + value + ", ignoring it");
logger.debug("Could not parse the value: {}, ignoring it", value);
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////

@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "lists recurring snapshots by snapshot policy ID")
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "Lists recurring snapshots by Snapshot policy ID")
private Long snapshotPolicyId;

@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "list recurring snapshots by volume ID")
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "List recurring snapshots by volume ID")
private Long volumeId;

/////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/network/Ipv6Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public interface Ipv6Service extends PluggableService, Configurable {
static final ConfigKey<Boolean> Ipv6OfferingCreationEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class,
"ipv6.offering.enabled",
"false",
"Indicates whether creation of IPv6 network/VPC offering is enabled or not.",
"Indicates whether creation of IPv6 Network/VPC offering is enabled or not.",
true);

static final ConfigKey<Integer> Ipv6PrefixSubnetCleanupInterval = new ConfigKey<Integer>("Advanced", Integer.class,
Expand Down
6 changes: 3 additions & 3 deletions api/src/main/java/com/cloud/network/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ enum Event {

public enum State {

Allocated("Indicates the network configuration is in allocated but not setup"), Setup("Indicates the network configuration is setup"), Implementing(
"Indicates the network configuration is being implemented"), Implemented("Indicates the network configuration is in use"), Shutdown(
"Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed");
Allocated("Indicates the Network configuration is in allocated but not setup"), Setup("Indicates the Network configuration is setup"), Implementing(
"Indicates the Network configuration is being implemented"), Implemented("Indicates the Network configuration is in use"), Shutdown(
"Indicates the Network configuration is being destroyed"), Destroy("Indicates that the Network is destroyed");

protected static final StateMachine2<State, Network.Event, Network> s_fsm = new StateMachine2<State, Network.Event, Network>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static State fromValue(String state) {
} else if (state.equalsIgnoreCase("scaling")) {
return SCALING;
} else {
throw new IllegalArgumentException("Unexpected AutoScale VM group state : " + state);
throw new IllegalArgumentException("Unexpected AutoScale Instance group state : " + state);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/user/ResourceLimitService.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public interface ResourceLimitService {

static final ConfigKey<Long> MaxAccountSecondaryStorage = new ConfigKey<>("Account Defaults", Long.class, "max.account.secondary.storage", "400",
"The default maximum secondary storage space (in GiB) that can be used for an account", false);
"The default maximum secondary storage space (in GiB) that can be used for an Account", false);
static final ConfigKey<Long> MaxProjectSecondaryStorage = new ConfigKey<>("Project Defaults", Long.class, "max.project.secondary.storage", "400",
"The default maximum secondary storage space (in GiB) that can be used for a project", false);
static final ConfigKey<Long> ResourceCountCheckInterval = new ConfigKey<>("Advanced", Long.class, "resourcecount.check.interval", "300",
Expand Down
6 changes: 3 additions & 3 deletions api/src/main/java/com/cloud/vm/snapshot/VMSnapshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity, StateObject<VMSnapshot.State> {

enum State {
Allocated("The VM snapshot is allocated but has not been created yet."), Creating("The VM snapshot is being created."), Ready(
"The VM snapshot is ready to be used."), Reverting("The VM snapshot is being used to revert"), Expunging("The volume is being expunging"), Removed(
Allocated("The Instance Snapshot is allocated but has not been created yet."), Creating("The Instance snapshot is being created."), Ready(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to check functional impact.

"The Instance Snapshot is ready to be used."), Reverting("The Instance Snapshot is being used to revert"), Expunging("The volume is being expunging"), Removed(
"The volume is destroyed, and can't be recovered."), Error("The volume is in error state, and can't be recovered"),
Hidden("The VM snapshot is hidden from the user and cannot be recovered.");
Hidden("The Instance Snapshot is hidden from the user and cannot be recovered.");

String _description;

Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/org/apache/cloudstack/acl/RoleType.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ public static Set<RoleType> fromCombinedMask(int combinedMask) {
* */
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
if (role != null) {
LOGGER.debug(String.format("Role [%s] is not null; therefore, we use its account type [%s].", role, defautAccountType));
LOGGER.debug(String.format("Role [%s] is not null; therefore, we use its Account type [%s].", role, defautAccountType));
return role.getRoleType().getAccountType();
}
LOGGER.debug(String.format("Role is null; therefore, we use the default account type [%s] value.", defautAccountType));
LOGGER.debug(String.format("Role is null; therefore, we use the default Account type [%s] value.", defautAccountType));
return defautAccountType;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,47 @@
public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse {

@SerializedName(ApiConstants.ID)
@Param(description = "the ID of the affinity group")
@Param(description = "The ID of the affinity group")
private String id;

@SerializedName(ApiConstants.NAME)
@Param(description = "the name of the affinity group")
@Param(description = "The name of the affinity group")
private String name;

@SerializedName(ApiConstants.DESCRIPTION)
@Param(description = "the description of the affinity group")
@Param(description = "The description of the affinity group")
private String description;

@SerializedName(ApiConstants.ACCOUNT)
@Param(description = "the account owning the affinity group")
@Param(description = "The account owning the affinity group")
private String accountName;

@SerializedName(ApiConstants.DOMAIN_ID)
@Param(description = "the domain ID of the affinity group")
@Param(description = "The domain ID of the affinity group")
private String domainId;

@SerializedName(ApiConstants.DOMAIN)
@Param(description = "the domain name of the affinity group")
@Param(description = "The domain name of the affinity group")
private String domainName;

@SerializedName(ApiConstants.DOMAIN_PATH)
@Param(description = "path of the Domain the affinity group belongs to", since = "4.19.2.0")
@Param(description = "Path of the Domain the affinity group belongs to", since = "4.19.2.0")
private String domainPath;

@SerializedName(ApiConstants.PROJECT_ID)
@Param(description = "the project ID of the affinity group")
@Param(description = "The project ID of the affinity group")
private String projectId;

@SerializedName(ApiConstants.PROJECT)
@Param(description = "the project name of the affinity group")
@Param(description = "The project name of the affinity group")
private String projectName;

@SerializedName(ApiConstants.TYPE)
@Param(description = "the type of the affinity group")
@Param(description = "The type of the affinity group")
private String type;

@SerializedName("virtualmachineIds")
@Param(description = "virtual machine IDs associated with this affinity group")
@Param(description = "Instance IDs associated with this affinity group")
private List<String> vmIdList;

@SerializedName("dedicatedresources")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class AffinityGroupTypeResponse extends BaseResponse {

@SerializedName(ApiConstants.TYPE)
@Param(description = "the type of the affinity group")
@Param(description = "The type of the affinity group")
private String type;

public AffinityGroupTypeResponse() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@
public abstract class AbstractGetUploadParamsCmd extends BaseCmd {


@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the volume/template/iso")
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the volume/template/iso")
private String name;

@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "the format for the volume/template/iso. Possible values include QCOW2, OVA, "
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "The format for the volume/template/iso. Possible values include QCOW2, OVA, "
+ "and VHD.")
private String format;

@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the zone the volume/template/iso is "
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The ID of the zone the volume/template/iso is "
+ "to be hosted on")
private Long zoneId;

@Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the checksum value of this volume/template/iso " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION)
@Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "The checksum value of this volume/template/iso " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION)
private String checksum;

@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.")
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional AccountName. Must be used with domainId.")
private String accountName;

@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId. If the account parameter is used, "
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "An optional domainId. If the Account parameter is used, "
+ "domainId must also be used.")
private Long domainId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd {
@Parameter(name = ApiConstants.CUSTOM_ID,
type = CommandType.STRING,
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
private String customId;

public String getCustomId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd {
@Parameter(name = ApiConstants.CUSTOM_ID,
type = CommandType.STRING,
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
private String customId;

public String getCustomId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public abstract class BaseCustomIdCmd extends BaseCmd {

@Parameter(name = ApiConstants.CUSTOM_ID,
type = CommandType.STRING,
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
private String customId;

public String getCustomId() {
Expand Down
Loading
Loading