Value current = newValue;
if (current.IsEmpty())
- BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existing object attribute"));
+ BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existent object attribute"));
String prefix = tokens[0];
prefix += "." + key;
if (!dict->Contains(key))
- BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existing object attribute"));
+ BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existent object attribute"));
current = dict->Get(key);
}
if (Utility::PathExists(key)) {
Log(LogInformation, "cli")
- << "Private key file '" << key << "' already existing, skipping.";
+ << "Private key file '" << key << "' already exists, not generating new certificate.";
return true;
}
if (Utility::PathExists(apiuserspath)) {
Log(LogInformation, "cli")
- << "API user config file '" << apiuserspath << "' already existing, skipping.";
+ << "API user config file '" << apiuserspath << "' already exists, not creating config file.";
return true;
}
if (Utility::PathExists(existing_path)) {
Log(LogWarning, "cli")
- << "Certificate '" << existing_path << "' for CN '" << cn << "' already existing. Skipping certificate generation.";
+ << "Certificate '" << existing_path << "' for CN '" << cn << "' already exists. Not generating new certificate.";
} else {
Log(LogInformation, "cli")
<< "Certificates not yet generated. Running 'api setup' now.";
BOOST_FOREACH(const String& object_path, object_paths) {
if (object_path.Contains(host_pattern)) {
Log(LogNotice, "cli")
- << "Host '" << host << "' already existing. Skipping its creation.";
+ << "Host '" << host << "' already exists.";
skip_host = true;
break;
}
if (NodeUtility::CheckAgainstBlackAndWhiteList("blacklist", node_name, host, Empty) &&
!NodeUtility::CheckAgainstBlackAndWhiteList("whitelist", node_name, host, Empty)) {
Log(LogWarning, "cli")
- << "Host '" << host << "' on node '" << node_name << "' is blacklisted, but not whitelisted. Skipping.";
+ << "Host '" << host << "' on node '" << node_name << "' is blacklisted, but not whitelisted. Not creating host object.";
skip_host = true;
host_was_blacklisted = true; //check this for services on this blacklisted host
}
BOOST_FOREACH(const String& object_path, object_paths) {
if (object_path.Contains(service_pattern)) {
Log(LogNotice, "cli")
- << "Service '" << service << "' on Host '" << host << "' already existing. Skipping its creation.";
+ << "Service '" << service << "' on Host '" << host << "' already exists.";
skip_service = true;
break;
}
!NodeUtility::CheckAgainstBlackAndWhiteList("whitelist", endpoint, host, service)) {
Log(LogWarning, "cli")
<< "Service '" << service << "' on host '" << host << "' on node '"
- << node_name << "' is blacklisted, but not whitelisted. Skipping.";
+ << node_name << "' is blacklisted, but not whitelisted. Not creating service object.";
skip_service = true;
}
if (Utility::PathExists(caCertFile) && Utility::PathExists(caKeyFile)) {
Log(LogCritical, "cli")
- << "CA files '" << caCertFile << "' and '" << caKeyFile << "'already exist.";
+ << "CA files '" << caCertFile << "' and '" << caKeyFile << "' already exist.";
return 1;
}
String command = change->Get("command");
Dictionary::Ptr attrs;
- if (change->Contains("attrs")) {
+ if (change->Contains("attrs"))
attrs = change->Get("attrs");
- }
bool success = false;
- if (command == "add") {
+ if (command == "add")
success = AddObjectInternal(name, type, attrs);
- }
- else if (command == "remove") {
+ else if (command == "remove")
success = RemoveObjectInternal(name, type, attrs);
- }
if (success) {
Log(LogNotice, "cli")
if (!object) {
Log(LogNotice, "ApiListener")
- << "Could not delete non-existing object '" << params->Get("name") << "'.";
+ << "Could not delete non-existent object '" << params->Get("name") << "'.";
return Empty;
}
Log(LogInformation, "ConfigPackageUtility")
<< "Updating configuration file: " << filePath;
- //pass the directory and generate a dir tree, if not existing already
+ // Pass the directory and generate a dir tree, if it does not already exist
Utility::MkDirP(Utility::DirName(filePath), 0750);
std::ofstream fp(filePath.CStr(), std::ofstream::out | std::ostream::binary | std::ostream::trunc);
fp << kv.second;