Update WhiskClient.go to use i18n IDs. (#684)
* Update WhiskClient.go to use i18n IDs.
* Update WhiskClient.go to use i18n IDs.
* Update WhiskClient.go to use i18n IDs.
* Update WhiskClient.go to use i18n IDs.
* Update WhiskClient.go to use i18n IDs.
* Update WhiskClient.go to use i18n IDs.
* Update WhiskClient.go to use i18n IDs.
* Update WhiskClient.go to use i18n IDs.
* update
* update
* update
* udpate runtimes.go for i18n.
* udpate runtimes.go for i18n.
* udpate servicedeployer.go for i18n.
* udpate servicedeployer.go for i18n.
* udpate servicedeployer.go for i18n.
* udpate servicedeployer.go for i18n.
* udpate servicedeployer.go for i18n.
* udpate servicedeployer.go for i18n.
* udpate servicedeployer.go for i18n.
* Add interactive prompts into whiskclient.go for i18n.
* Add interactive prompts into whiskclient.go for i18n.
* Add interactive prompts into whiskclient.go for i18n.
* Add i18n strings for managed deployments in servicedeployer.go.
* Continue adding i18n support in servicedeployer.go.
* Continue adding i18n support in servicedeployer.go.
* Create reusable method to create/display WhiskClientErrors in servicedeployer.go.
* Create reusable method to display deploy/undeply message in servicedeployer.go.
* Create reusable method to display deploy/undeployed success message in servicedeployer.go.
* Reusable method to perform deploy/undeploy postprocessing in servicedeployer.go
diff --git a/deployers/servicedeployer.go b/deployers/servicedeployer.go
index 6554539..39d1579 100644
--- a/deployers/servicedeployer.go
+++ b/deployers/servicedeployer.go
@@ -27,13 +27,12 @@
"strings"
"sync"
"time"
-
+ "net/http"
"github.com/apache/incubator-openwhisk-client-go/whisk"
"github.com/apache/incubator-openwhisk-wskdeploy/parsers"
"github.com/apache/incubator-openwhisk-wskdeploy/utils"
"github.com/apache/incubator-openwhisk-wskdeploy/wskderrors"
"github.com/apache/incubator-openwhisk-wskdeploy/wski18n"
- "net/http"
"github.com/apache/incubator-openwhisk-wskdeploy/wskprint"
)
@@ -143,14 +142,15 @@
// OpenWhisk entities are annotated with Project Name and therefore
// Project Name in manifest/deployment file is mandatory for managed deployments
if deployer.ProjectName == "" {
- // TODO see if we can move string to translation file.
- return wskderrors.NewYAMLFileFormatError(manifest.Filepath, "Project name in manifest file is mandatory for managed deployments")
+ errmsg := wski18n.T(wski18n.ID_ERR_MISSING_MANDATORY_KEY_X_key_X,
+ map[string]interface{}{"key": "project name"})
+
+ return wskderrors.NewYAMLFileFormatError(manifest.Filepath, errmsg)
}
// Every OpenWhisk entity in the manifest file will be annotated with:
//managed: '{"__OW__PROJECT__NAME": <name>, "__OW__PROJECT_HASH": <hash>, "__OW__FILE": <path>}'
deployer.ManagedAnnotation, err = utils.GenerateManagedAnnotation(deployer.ProjectName, manifest.Filepath)
if err != nil {
- // TODO see if we can pass in the YAML file path on first parameter
return wskderrors.NewYAMLFileFormatError(manifest.Filepath, err.Error())
}
}
@@ -179,8 +179,8 @@
// (TODO) delete this warning after deprecating application in manifest file
if manifest.Application.Name != "" {
- warningString := wski18n.T("WARNING: application in manifest file will soon be deprecated, please use project instead.\n")
- whisk.Debug(whisk.DbgWarn, warningString)
+ wskprint.PrintOpenWhiskWarning(wski18n.T(wski18n.ID_WARN_DEPRECATED_KEY_REPLACED,
+ map[string]interface{}{"oldkey": "application", "newkey": "project", "filetype": "manifest"}))
}
// process deployment file
@@ -194,17 +194,21 @@
// (TODO) delete this warning after deprecating application in deployment file
if deploymentReader.DeploymentDescriptor.Application.Name != "" {
- warningString := wski18n.T("WARNING: application in deployment file will soon be deprecated, please use project instead.\n")
- whisk.Debug(whisk.DbgWarn, warningString)
+ wskprint.PrintOpenWhiskWarning(wski18n.T(wski18n.ID_WARN_DEPRECATED_KEY_REPLACED,
+ map[string]interface{}{"oldkey": "application", "newkey": "project", "filetype": "deployment"}))
}
- // compare the name of the project/application
+ // compare the name of the project
if len(deploymentReader.DeploymentDescriptor.GetProject().Packages) != 0 && len(projectName) != 0 {
projectNameDeploy := deploymentReader.DeploymentDescriptor.GetProject().Name
if projectNameDeploy != projectName {
- errorString := wski18n.T("The name of the project/application {{.projectNameDeploy}} in deployment file at [{{.deploymentFile}}] does not match the name of the project/application {{.projectNameManifest}}} in manifest file at [{{.manifestFile}}].",
- map[string]interface{}{"projectNameDeploy": projectNameDeploy, "deploymentFile": deployer.DeploymentPath,
- "projectNameManifest": projectName, "manifestFile": deployer.ManifestPath})
+ errorString := wski18n.T(wski18n.ID_ERR_MISMATCH_NAME_X_key_X_dname_X_dpath_X_mname_X_moath_X,
+ map[string]interface{}{
+ "key": "project",
+ "dname": projectNameDeploy,
+ "dpath": deployer.DeploymentPath,
+ "mname": projectName,
+ "mpath": deployer.ManifestPath})
return wskderrors.NewYAMLFileFormatError(manifest.Filepath, errorString)
}
}
@@ -257,8 +261,8 @@
// (TODO) delete this warning after deprecating application in manifest file
if manifest.Application.Name != "" {
- warningString := wski18n.T("WARNING: application in manifest file will soon be deprecated, please use project instead.\n")
- whisk.Debug(whisk.DbgWarn, warningString)
+ wskprint.PrintOpenWhiskWarning(wski18n.T(wski18n.ID_WARN_DEPRECATED_KEY_REPLACED,
+ map[string]interface{}{"oldkey": "application", "newkey": "project", "filetype": "manifest"}))
}
// process deployment file
@@ -271,16 +275,21 @@
// (TODO) delete this warning after deprecating application in deployment file
if deploymentReader.DeploymentDescriptor.Application.Name != "" {
- warningString := wski18n.T("WARNING: application in deployment file will soon be deprecated, please use project instead.\n")
- whisk.Debug(whisk.DbgWarn, warningString)
+ wskprint.PrintOpenWhiskWarning(wski18n.T(wski18n.ID_WARN_DEPRECATED_KEY_REPLACED,
+ map[string]interface{}{"oldkey": "application", "newkey": "project", "filetype": "deployment"}))
}
+
// compare the name of the application
if len(deploymentReader.DeploymentDescriptor.GetProject().Packages) != 0 && len(projectName) != 0 {
projectNameDeploy := deploymentReader.DeploymentDescriptor.GetProject().Name
if projectNameDeploy != projectName {
- errorString := wski18n.T("The name of the project/application {{.projectNameDeploy}} in deployment file at [{{.deploymentFile}}] does not match the name of the application {{.projectNameManifest}}} in manifest file at [{{.manifestFile}}].",
- map[string]interface{}{"projectNameDeploy": projectNameDeploy, "deploymentFile": deployer.DeploymentPath,
- "projectNameManifest": projectName, "manifestFile": deployer.ManifestPath})
+ errorString := wski18n.T(wski18n.ID_ERR_MISMATCH_NAME_X_key_X_dname_X_dpath_X_mname_X_moath_X,
+ map[string]interface{}{
+ "key": "project",
+ "dname": projectNameDeploy,
+ "dpath": deployer.DeploymentPath,
+ "mname": projectName,
+ "mpath": deployer.ManifestPath})
return deployer.Deployment, wskderrors.NewYAMLFileFormatError(manifest.Filepath, errorString)
}
}
@@ -301,9 +310,10 @@
if deployer.IsInteractive == true {
deployer.printDeploymentAssets(deployer.Deployment)
- reader := bufio.NewReader(os.Stdin)
- fmt.Print("Do you really want to deploy this? (y/N): ")
+ // TODO() See if we can use the promptForValue() function in whiskclient.go
+ reader := bufio.NewReader(os.Stdin)
+ fmt.Print(wski18n.T(wski18n.ID_MSG_PROMPT_DEPLOY))
text, _ := reader.ReadString('\n')
text = strings.TrimSpace(text)
@@ -311,32 +321,34 @@
text = "n"
}
+ // TODO() make possible responses constants (enum?) and create "No" corallary
if strings.EqualFold(text, "y") || strings.EqualFold(text, "yes") {
deployer.InteractiveChoice = true
if err := deployer.deployAssets(); err != nil {
- errString := wski18n.T("Deployment did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n")
- whisk.Debug(whisk.DbgError, errString)
+ wskprint.PrintOpenWhiskError(wski18n.T(wski18n.ID_MSG_DEPLOYMENT_FAILED))
return err
}
- wskprint.PrintOpenWhiskSuccess(wski18n.T("Deployment completed successfully.\n"))
+ wskprint.PrintOpenWhiskSuccess(wski18n.T(wski18n.ID_MSG_DEPLOYMENT_SUCCEEDED))
return nil
} else {
+ // TODO() Should acknowledge if user typed (No/N/n) and if not still exit, but
+ // indicate we took the response to mean "No", typically by displaying interpolated
+ // response in parenthesis
deployer.InteractiveChoice = false
- wskprint.PrintOpenWhiskSuccess(wski18n.T("OK. Cancelling deployment.\n"))
+ wskprint.PrintOpenWhiskSuccess(wski18n.T(wski18n.ID_MSG_DEPLOYMENT_CANCELLED))
return nil
}
}
// non-interactive
if err := deployer.deployAssets(); err != nil {
- errString := wski18n.T("Deployment did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n")
- whisk.Debug(whisk.DbgError, errString)
+ wskprint.PrintOpenWhiskError(wski18n.T(wski18n.ID_MSG_DEPLOYMENT_FAILED))
return err
}
- wskprint.PrintOpenWhiskSuccess(wski18n.T("Deployment completed successfully.\n"))
+ wskprint.PrintOpenWhiskSuccess(wski18n.T(wski18n.T(wski18n.ID_MSG_DEPLOYMENT_SUCCEEDED)))
return nil
}
@@ -377,7 +389,7 @@
// from the manifest file must result in undeployment of those deleted entities
if utils.Flags.Managed {
if err := deployer.RefreshManagedEntities(deployer.ManagedAnnotation); err != nil {
- errString := wski18n.T("Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n")
+ errString := wski18n.T(wski18n.ID_MSG_MANAGED_UNDEPLOYMENT_FAILED)
whisk.Debug(whisk.DbgError, errString)
return err
}
@@ -389,8 +401,8 @@
func (deployer *ServiceDeployer) DeployDependencies() error {
for _, pack := range deployer.Deployment.Packages {
for depName, depRecord := range pack.Dependencies {
- output := wski18n.T("Deploying dependency {{.output}} ...",
- map[string]interface{}{"output": depName})
+ output := wski18n.T(wski18n.ID_MSG_DEPENDENCY_DEPLOYING_X_name_X,
+ map[string]interface{}{"name": depName})
whisk.Debug(whisk.DbgInfo, output)
if depRecord.IsBinding {
@@ -413,8 +425,8 @@
if error != nil {
return error
} else {
- output := wski18n.T("Dependency {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": depName})
+ output := wski18n.T(wski18n.ID_MSG_DEPENDENCY_DEPLOYMENT_SUCCESS_X_name_X,
+ map[string]interface{}{"name": depName})
whisk.Debug(whisk.DbgInfo, output)
}
@@ -430,8 +442,8 @@
}
if err := depServiceDeployer.deployAssets(); err != nil {
- errString := wski18n.T("Deployment of dependency {{.depName}} did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n",
- map[string]interface{}{"depName": depName})
+ errString := wski18n.T(wski18n.ID_MSG_DEPENDENCY_DEPLOYMENT_FAILURE_X_name_X,
+ map[string]interface{}{"name": depName})
wskprint.PrintOpenWhiskError(errString)
return err
}
@@ -459,8 +471,8 @@
if err != nil {
return err
} else {
- output := wski18n.T("Dependency {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": depName})
+ output := wski18n.T(wski18n.ID_MSG_DEPENDENCY_DEPLOYMENT_SUCCESS_X_name_X,
+ map[string]interface{}{"name": depName})
whisk.Debug(whisk.DbgInfo, output)
}
}
@@ -471,6 +483,7 @@
return nil
}
+// TODO() display "update" | "synced" messages pre/post
func (deployer *ServiceDeployer) RefreshManagedEntities(maValue whisk.KeyValue) error {
ma := maValue.Value.(map[string]interface{})
@@ -489,6 +502,8 @@
return nil
}
+
+// TODO() display "update" | "synced" messages pre/post
func (deployer *ServiceDeployer) RefreshManagedActions(packageName string, ma map[string]interface{}) error {
options := whisk.ActionListOptions{}
// get a list of actions in your namespace
@@ -512,10 +527,14 @@
// that this action is deleted from the project in manifest file
if aa[utils.OW_PROJECT_NAME] == ma[utils.OW_PROJECT_NAME] && aa[utils.OW_PROJECT_HASH] != ma[utils.OW_PROJECT_HASH] {
actionName := strings.Join([]string{packageName, action.Name}, "/")
- output := wski18n.T("Found the action {{.action}} which is deleted"+
- " from the current project {{.project}} in manifest file which is being undeployed.\n",
- map[string]interface{}{"action": actionName, "project": aa[utils.OW_PROJECT_NAME]})
- whisk.Debug(whisk.DbgInfo, output)
+
+ output := wski18n.T(wski18n.ID_MSG_MANAGED_FOUND_DELETED_X_key_X_name_X_project_X,
+ map[string]interface{}{
+ "key": "action",
+ "name": actionName,
+ "project": aa[utils.OW_PROJECT_NAME]})
+ wskprint.PrintOpenWhiskWarning(output)
+
var err error
err = retry(DEFAULT_ATTEMPTS, DEFAULT_INTERVAL, func() error {
_, err := deployer.Client.Actions.Delete(actionName)
@@ -531,6 +550,7 @@
return nil
}
+// TODO() display "update" | "synced" messages pre/post
func (deployer *ServiceDeployer) RefreshManagedTriggers(ma map[string]interface{}) error {
options := whisk.TriggerListOptions{}
// Get list of triggers in your namespace
@@ -549,10 +569,13 @@
ta := a.(map[string]interface{})
if ta[utils.OW_PROJECT_NAME] == ma[utils.OW_PROJECT_NAME] && ta[utils.OW_PROJECT_HASH] != ma[utils.OW_PROJECT_HASH] {
// we have found a trigger which was earlier part of the current project
- output := wski18n.T("Found the trigger {{.trigger}} which is deleted"+
- " from the current project {{.project}} in manifest file which is being undeployed.\n",
- map[string]interface{}{"trigger": trigger.Name, "project": ma[utils.OW_PROJECT_NAME]})
- whisk.Debug(whisk.DbgInfo, output)
+ output := wski18n.T(wski18n.ID_MSG_MANAGED_FOUND_DELETED_X_key_X_name_X_project_X,
+ map[string]interface{}{
+ "key": "trigger",
+ "name": trigger.Name,
+ "project": ma[utils.OW_PROJECT_NAME]})
+ wskprint.PrintOpenWhiskWarning(output)
+
var err error
err = retry(DEFAULT_ATTEMPTS, DEFAULT_INTERVAL, func() error {
_, _, err := deployer.Client.Triggers.Delete(trigger.Name)
@@ -568,10 +591,13 @@
return nil
}
+// TODO() engage community to allow metadata (annotations) on Rules
+// TODO() display "update" | "synced" messages pre/post
func (deployer *ServiceDeployer) RefreshManagedRules(ma map[string]interface{}) error {
return nil
}
+// TODO() display "update" | "synced" messages pre/post
func (deployer *ServiceDeployer) RefreshManagedPackages(ma map[string]interface{}) error {
options := whisk.PackageListOptions{}
// Get the list of packages in your namespace
@@ -595,10 +621,13 @@
}
// we have found a package which was earlier part of the current project
if pa[utils.OW_PROJECT_NAME] == ma[utils.OW_PROJECT_NAME] && pa[utils.OW_PROJECT_HASH] != ma[utils.OW_PROJECT_HASH] {
- output := wski18n.T("Found the package {{.package}} which is deleted"+
- " from the current project {{.project}} in manifest file which is being undeployed.\n",
- map[string]interface{}{"package": pkg.Name, "project": pa[utils.OW_PROJECT_NAME]})
- whisk.Debug(whisk.DbgInfo, output)
+ output := wski18n.T(wski18n.ID_MSG_MANAGED_FOUND_DELETED_X_key_X_name_X_project_X,
+ map[string]interface{}{
+ "key": "package",
+ "name": pkg.Name,
+ "project": pa[utils.OW_PROJECT_NAME]})
+ wskprint.PrintOpenWhiskWarning(output)
+
var err error
err = retry(DEFAULT_ATTEMPTS, DEFAULT_INTERVAL, func() error {
_, err := deployer.Client.Packages.Delete(pkg.Name)
@@ -629,9 +658,9 @@
for _, pack := range deployer.Deployment.Packages {
for _, action := range pack.Sequences {
- error := deployer.createAction(pack.Package.Name, action.Action)
- if error != nil {
- return error
+ err := deployer.createAction(pack.Package.Name, action.Action)
+ if err != nil {
+ return err
}
}
}
@@ -657,14 +686,14 @@
for _, trigger := range deployer.Deployment.Triggers {
if feedname, isFeed := utils.IsFeedAction(trigger); isFeed {
- error := deployer.createFeedAction(trigger, feedname)
- if error != nil {
- return error
+ err := deployer.createFeedAction(trigger, feedname)
+ if err != nil {
+ return err
}
} else {
- error := deployer.createTrigger(trigger)
- if error != nil {
- return error
+ err := deployer.createTrigger(trigger)
+ if err != nil {
+ return err
}
}
@@ -676,9 +705,9 @@
// Deploy Rules into OpenWhisk
func (deployer *ServiceDeployer) DeployRules() error {
for _, rule := range deployer.Deployment.Rules {
- error := deployer.createRule(rule)
- if error != nil {
- return error
+ err := deployer.createRule(rule)
+ if err != nil {
+ return err
}
}
return nil
@@ -687,20 +716,19 @@
// Deploy Apis into OpenWhisk
func (deployer *ServiceDeployer) DeployApis() error {
for _, api := range deployer.Deployment.Apis {
- error := deployer.createApi(api)
- if error != nil {
- return error
+ err := deployer.createApi(api)
+ if err != nil {
+ return err
}
}
return nil
}
func (deployer *ServiceDeployer) createBinding(packa *whisk.BindingPackage) error {
- output := wski18n.T("Deploying package binding {{.output}} ...",
- map[string]interface{}{"output": packa.Name})
- whisk.Debug(whisk.DbgInfo, output)
- var err error
+ displayPreprocessingInfo("package binding", packa.Name, true)
+
+ var err error
var response *http.Response
err = retry(DEFAULT_ATTEMPTS, DEFAULT_INTERVAL, func() error {
_, response, err = deployer.Client.Packages.Insert(packa, true)
@@ -708,23 +736,17 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating package binding with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
- } else {
- output := wski18n.T("Package binding {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": packa.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ return createWhiskClientError(err.(*whisk.WskError), response, "package binding", true)
}
+
+ displayPostprocessingInfo("package binding", packa.Name, true)
return nil
}
func (deployer *ServiceDeployer) createPackage(packa *whisk.Package) error {
- output := wski18n.T("Deploying package {{.output}} ...",
- map[string]interface{}{"output": packa.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPreprocessingInfo("package", packa.Name, true)
+
var err error
var response *http.Response
err = retry(DEFAULT_ATTEMPTS, DEFAULT_INTERVAL, func() error {
@@ -732,23 +754,17 @@
return err
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating package with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
- } else {
- output := wski18n.T("Package {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": packa.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ return createWhiskClientError(err.(*whisk.WskError), response, "package", true)
}
+
+ displayPostprocessingInfo("package", packa.Name, true)
return nil
}
func (deployer *ServiceDeployer) createTrigger(trigger *whisk.Trigger) error {
- output := wski18n.T("Deploying trigger {{.output}} ...",
- map[string]interface{}{"output": trigger.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPreprocessingInfo("trigger", trigger.Name, true)
+
var err error
var response *http.Response
err = retry(DEFAULT_ATTEMPTS, DEFAULT_INTERVAL, func() error {
@@ -756,23 +772,17 @@
return err
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating trigger with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
- } else {
- output := wski18n.T("Trigger {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": trigger.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ return createWhiskClientError(err.(*whisk.WskError), response, "trigger", true)
}
+
+ displayPostprocessingInfo("trigger", trigger.Name, true)
return nil
}
func (deployer *ServiceDeployer) createFeedAction(trigger *whisk.Trigger, feedName string) error {
- output := wski18n.T("Deploying trigger feed {{.output}} ...",
- map[string]interface{}{"output": trigger.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPreprocessingInfo("trigger feed", trigger.Name, true)
+
// to hold and modify trigger parameters, not passed by ref?
params := make(map[string]interface{})
@@ -811,11 +821,7 @@
return err
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating trigger with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "trigger feed", true)
} else {
qName, err := utils.ParseQualifiedName(feedName, deployer.ClientConfig.Namespace)
@@ -840,20 +846,17 @@
return err
})
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating trigger feed with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "trigger feed", false)
}
}
- output = wski18n.T("Trigger feed {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": trigger.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPostprocessingInfo("trigger feed", trigger.Name, true)
return nil
}
func (deployer *ServiceDeployer) createRule(rule *whisk.Rule) error {
+ displayPreprocessingInfo("rule", rule.Name, true)
+
// The rule's trigger should include the namespace with pattern /namespace/trigger
rule.Trigger = deployer.getQualifiedName(rule.Trigger.(string), deployer.ClientConfig.Namespace)
// The rule's action should include the namespace and package
@@ -867,9 +870,6 @@
// if not, we assume the action is inside the root package
rule.Action = deployer.getQualifiedName(strings.Join([]string{deployer.RootPackageName, rule.Action.(string)}, "/"), deployer.ClientConfig.Namespace)
}
- output := wski18n.T("Deploying rule {{.output}} ...",
- map[string]interface{}{"output": rule.Name})
- whisk.Debug(whisk.DbgInfo, output)
var err error
var response *http.Response
@@ -879,16 +879,10 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating rule with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "rule", true)
}
- output = wski18n.T("Rule {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": rule.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ displayPostprocessingInfo("rule", rule.Name, true)
return nil
}
@@ -899,9 +893,8 @@
// the action will be created under package with pattern 'packagename/actionname'
action.Name = strings.Join([]string{pkgname, action.Name}, "/")
}
- output := wski18n.T("Deploying action {{.output}} ...",
- map[string]interface{}{"output": action.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPreprocessingInfo("action", action.Name, true)
var err error
var response *http.Response
@@ -911,45 +904,42 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating action with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
- } else {
- output := wski18n.T("Action {{.output}} has been successfully deployed.\n",
- map[string]interface{}{"output": action.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ return createWhiskClientError(err.(*whisk.WskError), response, "action", true)
}
+
+ displayPostprocessingInfo("action", action.Name, true)
return nil
}
// create api (API Gateway functionality)
func (deployer *ServiceDeployer) createApi(api *whisk.ApiCreateRequest) error {
+
+ displayPreprocessingInfo("api", api.ApiDoc.ApiName, true)
+
var err error
var response *http.Response
+
+ // TODO() Is there an api delete function? could not find it
err = retry(DEFAULT_ATTEMPTS, DEFAULT_INTERVAL, func() error {
_, response, err = deployer.Client.Apis.Insert(api, nil, true)
return err
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error creating api with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "api", true)
}
+
+ displayPostprocessingInfo("api", api.ApiDoc.ApiName, true)
return nil
}
func (deployer *ServiceDeployer) UnDeploy(verifiedPlan *DeploymentProject) error {
if deployer.IsInteractive == true {
deployer.printDeploymentAssets(verifiedPlan)
+
+ // TODO() See if we can use the promptForValue() function in whiskclient.go
reader := bufio.NewReader(os.Stdin)
-
- fmt.Print("Do you really want to undeploy this? (y/N): ")
-
+ fmt.Print(wski18n.T(wski18n.ID_MSG_PROMPT_UNDEPLOY))
text, _ := reader.ReadString('\n')
text = strings.TrimSpace(text)
@@ -957,34 +947,33 @@
text = "n"
}
+ // TODO() Use constants for possible return values y/N/yes/No etc.
if strings.EqualFold(text, "y") || strings.EqualFold(text, "yes") {
deployer.InteractiveChoice = true
if err := deployer.unDeployAssets(verifiedPlan); err != nil {
- wskprint.PrintOpenWhiskError(wski18n.T("Undeployment did not complete sucessfully.\n"))
+ wskprint.PrintOpenWhiskError(wski18n.T(wski18n.T(wski18n.ID_MSG_UNDEPLOYMENT_FAILED)))
return err
}
- wskprint.PrintOpenWhiskSuccess(wski18n.T("Deployment removed successfully.\n"))
+ wskprint.PrintOpenWhiskSuccess(wski18n.T(wski18n.T(wski18n.ID_MSG_UNDEPLOYMENT_SUCCEEDED)))
return nil
} else {
deployer.InteractiveChoice = false
- wskprint.PrintOpenWhiskSuccess(wski18n.T("OK. Canceling undeployment.\n"))
+ wskprint.PrintOpenWhiskSuccess(wski18n.T(wski18n.T(wski18n.ID_MSG_UNDEPLOYMENT_CANCELLED)))
return nil
}
}
// non-interactive
if err := deployer.unDeployAssets(verifiedPlan); err != nil {
- errString := wski18n.T("Undeployment did not complete sucessfully.\n")
- whisk.Debug(whisk.DbgError, errString)
+ wskprint.PrintOpenWhiskError(wski18n.T(wski18n.T(wski18n.ID_MSG_UNDEPLOYMENT_FAILED)))
return err
}
- wskprint.PrintOpenWhiskSuccess(wski18n.T("Deployment removed successfully.\n"))
+ wskprint.PrintOpenWhiskSuccess(wski18n.T(wski18n.T(wski18n.ID_MSG_UNDEPLOYMENT_SUCCEEDED)))
return nil
-
}
func (deployer *ServiceDeployer) unDeployAssets(verifiedPlan *DeploymentProject) error {
@@ -1014,14 +1003,13 @@
}
return nil
-
}
func (deployer *ServiceDeployer) UnDeployDependencies() error {
for _, pack := range deployer.Deployment.Packages {
for depName, depRecord := range pack.Dependencies {
- output := wski18n.T("Undeploying dependency {{.depName}} ...",
- map[string]interface{}{"depName": depName})
+ output := wski18n.T(wski18n.ID_MSG_DEPENDENCY_UNDEPLOYING_X_name_X,
+ map[string]interface{}{"name": depName})
whisk.Debug(whisk.DbgInfo, output)
if depRecord.IsBinding {
@@ -1055,24 +1043,20 @@
return err
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error deleting binding package with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "package binding", false)
}
}
}
if err := depServiceDeployer.unDeployAssets(plan); err != nil {
- errString := wski18n.T("Undeployment of dependency {{.depName}} did not complete sucessfully.\n",
- map[string]interface{}{"depName": depName})
+ errString := wski18n.T(wski18n.ID_MSG_DEPENDENCY_UNDEPLOYMENT_FAILURE_X_name_X,
+ map[string]interface{}{"name": depName})
whisk.Debug(whisk.DbgError, errString)
return err
}
}
- output = wski18n.T("Dependency {{.depName}} has been successfully undeployed.\n",
- map[string]interface{}{"depName": depName})
+ output = wski18n.T(wski18n.ID_MSG_DEPENDENCY_UNDEPLOYMENT_SUCCESS_X_name_X,
+ map[string]interface{}{"name": depName})
whisk.Debug(whisk.DbgInfo, output)
}
}
@@ -1151,9 +1135,9 @@
}
func (deployer *ServiceDeployer) deletePackage(packa *whisk.Package) error {
- output := wski18n.T("Removing package {{.package}} ...",
- map[string]interface{}{"package": packa.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPreprocessingInfo("package", packa.Name, false)
+
if _, _, ok := deployer.Client.Packages.Get(packa.Name); ok == nil {
var err error
var response *http.Response
@@ -1163,20 +1147,16 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error deleting package with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "package", false)
}
}
+ displayPostprocessingInfo("package", packa.Name, false)
return nil
}
func (deployer *ServiceDeployer) deleteTrigger(trigger *whisk.Trigger) error {
- output := wski18n.T("Removing trigger {{.trigger}} ...",
- map[string]interface{}{"trigger": trigger.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPreprocessingInfo("trigger", trigger.Name, false)
var err error
var response *http.Response
@@ -1186,16 +1166,10 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error deleting trigger with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
- } else {
- output := wski18n.T("Trigger {{.trigger}} has been removed.\n",
- map[string]interface{}{"trigger": trigger.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ return createWhiskClientError(err.(*whisk.WskError), response, "trigger", false)
}
+
+ displayPostprocessingInfo("trigger", trigger.Name, false)
return nil
}
@@ -1242,11 +1216,7 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error deleting trigger with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "trigger", false)
}
}
@@ -1254,9 +1224,8 @@
}
func (deployer *ServiceDeployer) deleteRule(rule *whisk.Rule) error {
- output := wski18n.T("Removing rule {{.rule}} ...",
- map[string]interface{}{"rule": rule.Name})
- whisk.Debug(whisk.DbgInfo, output)
+
+ displayPreprocessingInfo("rule", rule.Name, false)
var err error
var response *http.Response
@@ -1266,29 +1235,21 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error deleting rule with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "rule", false)
}
- output = wski18n.T("Rule {{.rule}} has been removed.\n",
- map[string]interface{}{"rule": rule.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ displayPostprocessingInfo("rule", rule.Name, false)
return nil
}
// Utility function to call go-whisk framework to make action
func (deployer *ServiceDeployer) deleteAction(pkgname string, action *whisk.Action) error {
- // call ActionService Thru Client
+ // call ActionService through Client
if deployer.DeployActionInPackage {
// the action will be deleted under package with pattern 'packagename/actionname'
action.Name = strings.Join([]string{pkgname, action.Name}, "/")
}
- output := wski18n.T("Removing action {{.action}} ...",
- map[string]interface{}{"action": action.Name})
- whisk.Debug(whisk.DbgInfo, output)
+ displayPreprocessingInfo("action", action.Name, false)
if _, _, ok := deployer.Client.Actions.Get(action.Name); ok == nil {
var err error
@@ -1299,17 +1260,11 @@
})
if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Got error deleting action with error message: {{.err}} and error code: {{.code}}.\n",
- map[string]interface{}{"err": wskErr.Error(), "code": strconv.Itoa(wskErr.ExitCode)})
- whisk.Debug(whisk.DbgError, errString)
- return wskderrors.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode, response)
+ return createWhiskClientError(err.(*whisk.WskError), response, "action", false)
}
- output = wski18n.T("Action {{.action}} has been removed.\n",
- map[string]interface{}{"action": action.Name})
- whisk.Debug(whisk.DbgInfo, output)
}
+ displayPostprocessingInfo("action", action.Name, false)
return nil
}
@@ -1324,6 +1279,7 @@
wskErr := err.(*whisk.WskError)
if wskErr.ExitCode == CONFLICT_CODE && strings.Contains(wskErr.Error(), CONFLICT_MESSAGE) {
time.Sleep(sleep)
+ // TODO() i18n
whisk.Debug(whisk.DbgError, "Retrying [%s] after error: %s\n", strconv.Itoa(i+1), err)
} else {
return err
@@ -1478,3 +1434,52 @@
return depServiceDeployer, nil
}
+
+func displayPreprocessingInfo(entity string, name string, onDeploy bool){
+
+ var msgKey string
+ if onDeploy{
+ msgKey = wski18n.ID_MSG_ENTITY_DEPLOYING_X_key_X_name_X
+ } else {
+ msgKey = wski18n.ID_MSG_ENTITY_UNDEPLOYING_X_key_X_name_X
+ }
+ msg := wski18n.T(msgKey,
+ map[string]interface{}{
+ "key": entity,
+ "name": name})
+ whisk.Debug(whisk.DbgInfo, msg)
+}
+
+func displayPostprocessingInfo(entity string, name string, onDeploy bool){
+
+ var msgKey string
+ if onDeploy{
+ msgKey = wski18n.ID_MSG_ENTITY_DEPLOYED_SUCCESS_X_key_X_name_X
+ } else {
+ msgKey = wski18n.ID_MSG_ENTITY_UNDEPLOYED_SUCCESS_X_key_X_name_X
+ }
+ errString := wski18n.T(msgKey,
+ map[string]interface{}{
+ "key": entity,
+ "name": name})
+ whisk.Debug(whisk.DbgInfo, errString)
+}
+
+func createWhiskClientError(err *whisk.WskError, response *http.Response, entity string, onCreate bool)(*wskderrors.WhiskClientError){
+
+ var msgKey string
+ if onCreate{
+ msgKey = wski18n.ID_ERR_CREATE_ENTITY_X_key_X_err_X_code_X
+ } else {
+ msgKey = wski18n.ID_ERR_DELETE_ENTITY_X_key_X_err_X_code_X
+ }
+ errString := wski18n.T(msgKey,
+ map[string]interface{}{
+ "key": entity,
+ "err": err.Error(),
+ "code": strconv.Itoa(err.ExitCode)})
+ whisk.Debug(whisk.DbgError, errString)
+
+ // TODO() add errString as an AppendDetail() to WhiskClientError
+ return wskderrors.NewWhiskClientError(err.Error(), err.ExitCode, response)
+}
diff --git a/deployers/whiskclient.go b/deployers/whiskclient.go
index c5a5df5..64dba3d 100644
--- a/deployers/whiskclient.go
+++ b/deployers/whiskclient.go
@@ -30,16 +30,16 @@
"github.com/apache/incubator-openwhisk-wskdeploy/parsers"
"github.com/apache/incubator-openwhisk-wskdeploy/utils"
"github.com/apache/incubator-openwhisk-wskdeploy/wski18n"
- "github.com/apache/incubator-openwhisk-wskdeploy/wskderrors"
"github.com/apache/incubator-openwhisk-wskdeploy/wskprint"
+ "github.com/apache/incubator-openwhisk-wskdeploy/wskderrors"
)
const (
- COMMANDLINE = "wskdeploy command line"
+ COMMANDLINE = "wskdeploy command line"
DEFAULTVALUE = "default value"
- WSKPROPS = ".wskprops"
+ WSKPROPS = ".wskprops"
WHISKPROPERTY = "whisk.properties"
- INTERINPUT = "interactve input"
+ INTERINPUT = "interactve input"
)
type PropertyValue struct {
@@ -67,7 +67,7 @@
return utils.Flags.ApiHost, utils.Flags.Auth, utils.Flags.Namespace, utils.Flags.Key, utils.Flags.Cert
}
-var CreateNewClient = func (config_input *whisk.Config) (*whisk.Client, error) {
+var CreateNewClient = func(config_input *whisk.Config) (*whisk.Client, error) {
var netClient = &http.Client{
Timeout: time.Second * utils.DEFAULT_HTTP_TIMEOUT,
}
@@ -85,16 +85,16 @@
credential := PropertyValue{}
namespace := PropertyValue{}
apiHost := PropertyValue{}
- key := PropertyValue{}
- cert := PropertyValue{}
+ key := PropertyValue{}
+ cert := PropertyValue{}
// read credentials from command line
apihost, auth, ns, keyfile, certfile := GetCommandLineFlags()
credential = GetPropertyValue(credential, auth, COMMANDLINE)
namespace = GetPropertyValue(namespace, ns, COMMANDLINE)
apiHost = GetPropertyValue(apiHost, apihost, COMMANDLINE)
- key = GetPropertyValue(key, keyfile, COMMANDLINE)
- cert = GetPropertyValue(cert, certfile, COMMANDLINE)
+ key = GetPropertyValue(key, keyfile, COMMANDLINE)
+ cert = GetPropertyValue(cert, certfile, COMMANDLINE)
// now, read them from deployment file if not found on command line
if len(credential.Value) == 0 || len(namespace.Value) == 0 || len(apiHost.Value) == 0 {
@@ -138,29 +138,33 @@
credential = GetPropertyValue(credential, wskprops.AuthKey, WSKPROPS)
namespace = GetPropertyValue(namespace, wskprops.Namespace, WSKPROPS)
apiHost = GetPropertyValue(apiHost, wskprops.APIHost, WSKPROPS)
- key = GetPropertyValue(key, wskprops.Key, WSKPROPS)
- cert = GetPropertyValue(cert, wskprops.Cert, WSKPROPS)
+ key = GetPropertyValue(key, wskprops.Key, WSKPROPS)
+ cert = GetPropertyValue(cert, wskprops.Cert, WSKPROPS)
+ // TODO() see if we can split the following whisk prop logic into a separate function
// now, read credentials from whisk.properties but this is only acceptable within Travis
// whisk.properties will soon be deprecated and should not be used for any production deployment
whiskproperty, _ := GetWskPropFromWhiskProperty(pi)
+
+ var warnmsg string
+
credential = GetPropertyValue(credential, whiskproperty.AuthKey, WHISKPROPERTY)
if credential.Source == WHISKPROPERTY {
- // TODO() i18n
- wskprint.PrintlnOpenWhiskWarning("The authentication key was retrieved from whisk.properties " +
- "which will soon be deprecated please do not use it outside of Travis builds.")
+ warnmsg = wski18n.T(wski18n.ID_WARN_WHISK_PROPS_DEPRECATED,
+ map[string]interface{}{"key": "authenticaton key"})
+ wskprint.PrintlnOpenWhiskWarning(warnmsg)
}
namespace = GetPropertyValue(namespace, whiskproperty.Namespace, WHISKPROPERTY)
if namespace.Source == WHISKPROPERTY {
- // TODO() i18n
- wskprint.PrintlnOpenWhiskWarning("The namespace was retrieved from whisk.properties " +
- "which will soon be deprecated please do not use it outside of Travis builds.")
+ warnmsg = wski18n.T(wski18n.ID_WARN_WHISK_PROPS_DEPRECATED,
+ map[string]interface{}{"key": "namespace"})
+ wskprint.PrintlnOpenWhiskWarning(warnmsg)
}
apiHost = GetPropertyValue(apiHost, whiskproperty.APIHost, WHISKPROPERTY)
if apiHost.Source == WHISKPROPERTY {
- // TODO() i18n
- wskprint.PrintlnOpenWhiskWarning("The API host was retrieved from whisk.properties " +
- "which will soon be deprecated please do not use it outside of Travis builds.")
+ warnmsg = wski18n.T(wski18n.ID_WARN_WHISK_PROPS_DEPRECATED,
+ map[string]interface{}{"key": "API host"})
+ wskprint.PrintlnOpenWhiskWarning(warnmsg)
}
// set namespace to default namespace if not yet found
@@ -169,14 +173,15 @@
namespace.Source = DEFAULTVALUE
}
+ // TODO() See if we can split off the interactive logic into a separate function
// If we still can not find the values we need, check if it is interactive mode.
// If so, we prompt users for the input.
// The namespace is set to a default value at this point if not provided.
if len(apiHost.Value) == 0 && isInteractive == true {
- // TODO() i18n
- host := promptForValue("\nPlease provide the hostname for OpenWhisk [default value is openwhisk.ng.bluemix.net]: ")
+ host := promptForValue(wski18n.T(wski18n.ID_MSG_PROMPT_APIHOST))
if host == "" {
- // TODO() tell caller that we are using this default, look to make a const at top of file
+ // TODO() programmatically tell caller that we are using this default
+ // TODO() make this configurable or remove
host = "openwhisk.ng.bluemix.net"
}
apiHost.Value = host
@@ -184,83 +189,83 @@
}
if len(credential.Value) == 0 && isInteractive == true {
- // TODO() i18n
- cred := promptForValue("\nPlease provide an authentication token: ")
+ cred := promptForValue(wski18n.T(wski18n.ID_MSG_PROMPT_AUTHKEY))
credential.Value = cred
credential.Source = INTERINPUT
// The namespace is always associated with the credential. Both of them should be picked up from the same source.
if len(namespace.Value) == 0 || namespace.Value == whisk.DEFAULT_NAMESPACE {
- // TODO() i18n
- ns := promptForValue("\nPlease provide a namespace [default value is guest]: ")
+ tempNamespace := promptForValue(wski18n.T(wski18n.ID_MSG_PROMPT_NAMESPACE))
source := INTERINPUT
- if ns == "" {
- ns = whisk.DEFAULT_NAMESPACE
+ if tempNamespace == "" {
+ tempNamespace = whisk.DEFAULT_NAMESPACE
source = DEFAULTVALUE
}
- namespace.Value = ns
+ namespace.Value = tempNamespace
namespace.Source = source
}
}
- mode := true
- if (len(cert.Value) != 0 && len(key.Value) != 0) {
- mode = false
- }
+ mode := true
+ if (len(cert.Value) != 0 && len(key.Value) != 0) {
+ mode = false
+ }
- clientConfig = &whisk.Config {
+ clientConfig = &whisk.Config{
AuthToken: credential.Value, //Authtoken
- Namespace: namespace.Value, //Namespace
+ Namespace: namespace.Value, //Namespace
Host: apiHost.Value,
Version: "v1",
- Cert: cert.Value,
- Key: key.Value,
+ Cert: cert.Value,
+ Key: key.Value,
Insecure: mode, // true if you want to ignore certificate signing
}
+ // validate we have credential, apihost and namespace
+ err := validateClientConfig(credential, apiHost, namespace)
+
+ return clientConfig, err
+}
+
+func validateClientConfig(credential PropertyValue, apiHost PropertyValue, namespace PropertyValue) (error) {
+
+ // Display error message based upon which config value was missing
if len(credential.Value) == 0 || len(apiHost.Value) == 0 || len(namespace.Value) == 0 {
- var errStr string
+ var errmsg string
if len(credential.Value) == 0 {
- errStr += wski18n.T("The authentication key is not configured.\n")
- } else {
- errStr += wski18n.T("The authenitcation key is set from {{.authsource}}.\n",
- map[string]interface{}{"authsource": credential.Source})
+ errmsg = wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_AUTHKEY)
}
if len(apiHost.Value) == 0 {
- errStr += wski18n.T("The API host is not configured.\n")
- } else {
- errStr += wski18n.T("The API host is {{.apihost}}, from {{.apisource}}.\n",
- map[string]interface{}{"apihost": apiHost.Value, "apisource": apiHost.Source})
+ errmsg = wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_APIHOST)
}
if len(namespace.Value) == 0 {
- errStr += wski18n.T("The namespace is not configured.\n")
- } else {
- errStr += wski18n.T("The namespace is {{.namespace}}, from {{.namespacesource}}.\n",
- map[string]interface{}{"namespace": namespace.Value, "namespacesource": namespace.Source})
-
+ errmsg = wski18n.T(wski18n.ID_MSG_CONFIG_MISSING_NAMESPACE)
}
- whisk.Debug(whisk.DbgError, errStr)
- return clientConfig, wskderrors.NewWhiskClientInvalidConfigError(errStr)
+
+ return wskderrors.NewWhiskClientInvalidConfigError(errmsg)
}
- stdout := wski18n.T("The API host is {{.apihost}}, from {{.apisource}}.\n",
- map[string]interface{}{"apihost": apiHost.Value, "apisource": apiHost.Source})
- whisk.Debug(whisk.DbgInfo, stdout)
+ // Show caller what final values we used for credential, apihost and namespace
+ stdout := wski18n.T(wski18n.ID_MSG_CONFIG_INFO_APIHOST_X_host_X_source_X,
+ map[string]interface{}{"host": apiHost.Value, "source": apiHost.Source})
+ wskprint.PrintOpenWhiskStatus(stdout)
- stdout = wski18n.T("The auth key is set, from {{.authsource}}.\n",
- map[string]interface{}{"authsource": credential.Source})
- whisk.Debug(whisk.DbgInfo, stdout)
+ stdout = wski18n.T(wski18n.ID_MSG_CONFIG_INFO_AUTHKEY_X_source_X,
+ map[string]interface{}{"source": credential.Source})
+ wskprint.PrintOpenWhiskStatus(stdout)
- stdout = wski18n.T("The namespace is {{.namespace}}, from {{.namespacesource}}.\n",
- map[string]interface{}{"namespace": namespace.Value, "namespacesource": namespace.Source})
- whisk.Debug(whisk.DbgInfo, stdout)
- return clientConfig, nil
+ stdout = wski18n.T(wski18n.ID_MSG_CONFIG_INFO_NAMESPACE_X_namespace_X_source_X,
+ map[string]interface{}{"namespace": namespace.Value, "source": namespace.Source})
+ wskprint.PrintOpenWhiskStatus(stdout)
+
+ return nil
}
+// TODO() move into its own package "wskread" and add support for passing in default value
var promptForValue = func(msg string) (string) {
reader := bufio.NewReader(os.Stdin)
fmt.Print(msg)
diff --git a/utils/runtimes.go b/utils/runtimes.go
index e39d027..bacc54d 100644
--- a/utils/runtimes.go
+++ b/utils/runtimes.go
@@ -74,6 +74,7 @@
// `curl -k https://openwhisk.ng.bluemix.net`
// hard coding it here in case of network unavailable or failure.
func ParseOpenWhisk(apiHost string) (op OpenWhiskInfo, err error) {
+ // TODO() create HTTP header constants and use them
ct := "application/json; charset=UTF-8"
req, _ := http.NewRequest("GET", "https://"+apiHost, nil)
req.Header.Set("Content-Type", ct)
@@ -92,7 +93,8 @@
res, err := netClient.Do(req)
if err != nil {
- errString := wski18n.T("Failed to get the supported runtimes from OpenWhisk service: {{.err}}.\n",
+ // TODO() create an error
+ errString := wski18n.T(wski18n.ID_ERR_GET_RUNTIMES_X_err_X,
map[string]interface{}{"err": err.Error()})
whisk.Debug(whisk.DbgWarn, errString)
}
@@ -102,14 +104,15 @@
}
// Local openwhisk deployment sometimes only returns "application/json" as the content type
+ // TODO() create HTTP header constants and use them
if err != nil || !strings.Contains(ct, res.Header.Get("Content-Type")) {
- stdout := wski18n.T("Start to unmarshal Openwhisk info from local values.\n")
+ stdout := wski18n.T(wski18n.ID_MSG_UNMARSHAL_LOCAL)
whisk.Debug(whisk.DbgInfo, stdout)
err = json.Unmarshal(RUNTIME_DETAILS, &op)
} else {
b, _ := ioutil.ReadAll(res.Body)
if b != nil && len(b) > 0 {
- stdout := wski18n.T("Unmarshal Openwhisk info from internet.\n")
+ stdout := wski18n.T(wski18n.ID_MSG_UNMARSHAL_NETWORK)
whisk.Debug(whisk.DbgInfo, stdout)
err = json.Unmarshal(b, &op)
}
diff --git a/wskderrors/wskdeployerror.go b/wskderrors/wskdeployerror.go
index 461b356..c7d5e83 100644
--- a/wskderrors/wskdeployerror.go
+++ b/wskderrors/wskdeployerror.go
@@ -121,6 +121,10 @@
}
}
+func (e *WskDeployBaseErr) AppendDetail(detail string){
+ e.appendDetail(detail)
+}
+
func (e *WskDeployBaseErr) appendDetail(detail string){
fmt := fmt.Sprintf("\n%s %s", STR_INDENT_1, detail)
e.Message = e.Message + fmt
diff --git a/wski18n/i18n_ids.go b/wski18n/i18n_ids.go
index 6f6a369..cbd7519 100644
--- a/wski18n/i18n_ids.go
+++ b/wski18n/i18n_ids.go
@@ -35,307 +35,130 @@
ID_CMD_FLAG_KEY_FILE = "msg_cmd_flag_key_file" // "path of the .key file"
ID_CMD_FLAG_CERT_FILE = "msg_cmd_flag_cert_file" // "path of the .cert file"
+ // Configuration messages
+ ID_MSG_CONFIG_MISSING_AUTHKEY = "msg_config_missing_authkey"
+ ID_MSG_CONFIG_MISSING_APIHOST = "msg_config_missing_apihost"
+ ID_MSG_CONFIG_MISSING_NAMESPACE = "msg_config_missing_namespace"
+
+ ID_MSG_CONFIG_INFO_APIHOST_X_host_X_source_X = "msg_config_apihost_info"
+ ID_MSG_CONFIG_INFO_AUTHKEY_X_source_X = "msg_config_authkey_info"
+ ID_MSG_CONFIG_INFO_NAMESPACE_X_namespace_X_source_X = "msg_config_namespace_info"
+
+ // YAML marshall / unmarshall
+ ID_MSG_UNMARSHAL_LOCAL = "msg_unmarshall_local"
+ ID_MSG_UNMARSHAL_NETWORK = "msg_unmarshall_network"
+
// Informational
- ID_MSG_MANIFEST_DEPLOY_X_path_X = "msg_using_manifest_deploy" // "Using {{.path}} for deployment.\n"
- ID_MSG_MANIFEST_UNDEPLOY_X_path_X = "msg_using_manifest_undeploy" // "Using {{.path}} for undeployment.\n"
ID_MSG_MANIFEST_FILE_NOT_FOUND_X_path_X = "msg_manifest_not_found"
ID_MSG_RUNTIME_MISMATCH_X_runtime_X_ext_X_action_X = "msg_runtime_mismatch"
ID_MSG_RUNTIME_CHANGED_X_runtime_X_action_X = "msg_runtime_changed"
ID_MSG_RUNTIME_UNSUPPORTED_X_runtime_X_action_X = "msg_runtime_unsupported"
+ ID_MSG_MANIFEST_DEPLOY_X_path_X = "msg_using_manifest_deploy" // "Using {{.path}} for deployment.\n"
+ ID_MSG_MANIFEST_UNDEPLOY_X_path_X = "msg_using_manifest_undeploy" // "Using {{.path}} for undeployment.\n"
+
+ ID_MSG_DEPLOYMENT_SUCCEEDED = "msg_deployment_succeeded"
+ ID_MSG_DEPLOYMENT_FAILED = "msg_deployment_failed"
+ ID_MSG_DEPLOYMENT_CANCELLED = "msg_deployment_cancelled"
+
+ ID_MSG_ENTITY_DEPLOYING_X_key_X_name_X = "msg_entity_deploying"
+ ID_MSG_ENTITY_UNDEPLOYING_X_key_X_name_X = "msg_entity_undeploying"
+ ID_MSG_ENTITY_DEPLOYED_SUCCESS_X_key_X_name_X = "msg_entity_deployed_success"
+ ID_MSG_ENTITY_UNDEPLOYED_SUCCESS_X_key_X_name_X = "msg_entity_undeployed_success"
+
+ ID_MSG_UNDEPLOYMENT_SUCCEEDED = "msg_undeployment_succeeded"
+ ID_MSG_UNDEPLOYMENT_FAILED = "msg_undeployment_failed"
+ ID_MSG_UNDEPLOYMENT_CANCELLED = "msg_undeployment_cancelled"
+
+ ID_MSG_DEPENDENCY_DEPLOYING_X_name_X = "msg_deploying_dependency"
+ ID_MSG_DEPENDENCY_UNDEPLOYING_X_name_X = "msg_undeploying_dependency"
+ ID_MSG_DEPENDENCY_DEPLOYMENT_SUCCESS_X_name_X = "msg_dependency_deployment_success"
+ ID_MSG_DEPENDENCY_DEPLOYMENT_FAILURE_X_name_X = "msg_dependency_deployment_failure"
+ ID_MSG_DEPENDENCY_UNDEPLOYMENT_SUCCESS_X_name_X = "msg_dependency_undeployment_success"
+ ID_MSG_DEPENDENCY_UNDEPLOYMENT_FAILURE_X_name_X = "msg_dependency_undeployment_failure"
+
+ // Managed deployments
+ ID_MSG_MANAGED_UNDEPLOYMENT_FAILED = "msg_undeployment_managed_failed"
+ ID_MSG_MANAGED_FOUND_DELETED_X_key_X_name_X_project_X = "msg_managed_found_deleted_entity"
+
+ // Interactive (prompts)
+ ID_MSG_PROMPT_DEPLOY = "msg_prompt_deploy"
+ ID_MSG_PROMPT_UNDEPLOY = "msg_prompt_undeploy"
+ ID_MSG_PROMPT_AUTHKEY = "msg_prompt_authkey"
+ ID_MSG_PROMPT_APIHOST = "msg_prompt_apihost"
+ ID_MSG_PROMPT_NAMESPACE = "msg_prompt_namespace"
+
// Action Limits
- ID_MSG_ACTION_LIMIT_IGNORED_X_limit_X = "msg_action_limit_ignored" // for timeout, memorySize, logSize
+ ID_MSG_ACTION_LIMIT_IGNORED_X_limit_X = "msg_action_limit_ignored" // timeout, memorySize, logSize
+
+ // warnings
+ ID_WARN_DEPRECATED_KEY_REPLACED = "msg_warn_key_deprecated_replaced"
+ ID_WARN_WHISK_PROPS_DEPRECATED = "msg_warn_whisk_properties"
+
+ // Errors
+ ID_ERR_GET_RUNTIMES_X_err_X = "msg_err_get_runtimes"
+ ID_ERR_MISSING_MANDATORY_KEY_X_key_X = "msg_err_missing_mandatory_key"
+ ID_ERR_MISMATCH_NAME_X_key_X_dname_X_dpath_X_mname_X_moath_X = "msg_err_mismatch_name_project"
+ ID_ERR_CREATE_ENTITY_X_key_X_err_X_code_X = "msg_err_create_entity"
+ ID_ERR_DELETE_ENTITY_X_key_X_err_X_code_X = "msg_err_delete_entity"
)
-//"id": "WARNING: Invalid limitation 'timeout' of action in manifest is ignored. Please check errors.\n",
-//"translation": "WARNING: Invalid limitation 'timeout' of action in manifest is ignored. Please check errors.\n"
-//},
-//{
-//"id": "WARNING: Invalid limitation 'memorySize' of action in manifest is ignored. Please check errors.\n",
-//"translation": "WARNING: Invalid limitation 'memorySize' of action in manifest is ignored. Please check errors.\n"
-//},
-//{
-//"id": "WARNING: Invalid limitation 'logSize' of action in manifest is ignored. Please check errors.\n",
-//"translation": "WARNING: Invalid limitation 'logSize' of action in manifest is ignored. Please check errors.\n"
-//},
-
-//{
-//"id": "Unsupported runtime type, set to nodejs",
-//"translation": "Unsupported runtime type, set to nodejs"
-//},
-//{
-//"id": "The authentication key is not configured.\n",
-//"translation": "The authentication key is not configured.\n"
-//},
-//{
-//"id": "The API host is not configured.\n",
-//"translation": "The API host is not configured.\n"
-//},
-//{
-//"id": "The namespace is not configured.\n",
-//"translation": "The namespace is not configured.\n"
-//},
-//{
-//"id": "The API host is {{.apihost}}, from {{.apisource}}.\n",
-//"translation": "The API host is {{.apihost}}, from {{.apisource}}.\n"
-//},
-//{
-//"id": "The auth key is set, from {{.authsource}}.\n",
-//"translation": "The auth key is set, from {{.authsource}}.\n"
-//},
-//{
-//"id": "The namespace is {{.namespace}}, from {{.namespacesource}}.\n",
-//"translation": "The namespace is {{.namespace}}, from {{.namespacesource}}.\n"
-//},
-//{
-//"id": "Failed to get the supported runtimes from OpenWhisk service: {{.err}}.\n",
-//"translation": "Failed to get the supported runtimes from OpenWhisk service: {{.err}}.\n"
-//},
-//{
-//"id": "Start to unmarshal Openwhisk info from local values.\n",
-//"translation": "Start to unmarshal Openwhisk info from local values.\n"
-//},
-//{
-//"id": "Unmarshal Openwhisk info from internet.\n",
-//"translation": "Unmarshal Openwhisk info from internet.\n"
-//},
-//{
-//"id": "Deployment completed successfully.\n",
-//"translation": "Deployment completed successfully.\n"
-//},
-//{
-//"id": "Got error creating package with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error creating package with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error creating action with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error creating package with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error creating api with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error creating api with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error creating rule with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error creating rule with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error creating trigger with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error creating trigger with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error creating trigger feed with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error creating trigger feed with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error creating package binding with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error creating package binding with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Deployment of dependency {{.depName}} did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n",
-//"translation": "Deployment of dependency {{.depName}} did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
-//},
-//{
-//"id": "Deploying action {{.output}} ...",
-//"translation": "Deploying action {{.output}} ..."
-//},
-//{
-//"id": "Deploying rule {{.output}} ...",
-//"translation": "Deploying rule {{.output}} ..."
-//},
-//{
-//"id": "Deploying trigger feed {{.output}} ...",
-//"translation": "Deploying trigger feed {{.output}} ..."
-//},
-//{
-//"id": "Deploying package {{.output}} ...",
-//"translation": "Deploying package {{.output}} ..."
-//},
-//{
-//"id": "Deploying package binding {{.output}} ...",
-//"translation": "Deploying package binding {{.output}} ..."
-//},
-//{
-//"id": "Deploying dependency {{.output}} ...",
-//"translation": "Deploying dependency {{.output}} ..."
-//},
-//{
-//"id": "OK. Cancelling deployment.\n",
-//"translation": "OK. Cancelling deployment.\n"
-//},
-//{
-//"id": "OK. Canceling undeployment.\n",
-//"translation": "OK. Canceling undeployment.\n"
-//},
-//{
-//"id": "Undeployment did not complete sucessfully.\n",
-//"translation": "Undeployment did not complete sucessfully.\n"
-//},
-//{
-//"id": "Deployment removed successfully.\n",
-//"translation": "Deployment removed successfully.\n"
-//},
-//{
-//"id": "Undeployment did not complete sucessfully.\n",
-//"translation": "Undeployment did not complete sucessfully.\n"
-//},
-//{
-//"id": "Undeploying dependency {{.depName}} ...",
-//"translation": "Undeploying dependency {{.depName}} ..."
-//},
-//{
-//"id": "Undeployment of dependency {{.depName}} did not complete sucessfully.\n",
-//"translation": "Undeployment of dependency {{.depName}} did not complete sucessfully.\n"
-//},
-//{
-//"id": "Got error deleting action with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error deleting action with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error deleting rule with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error deleting rule with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error deleting trigger with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error deleting trigger with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Got error deleting package with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error deleting package with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "WARNING: The 'source' YAML key in trigger entity is deprecated. Please use 'feed' instead as described in specifications.\n",
-//"translation": "WARNING: The 'source' YAML key in trigger entity is deprecated. Please use 'feed' instead as described in specifications.\n"
-//},
-//{
-//"id": "Got error deleting binding package with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Got error deleting binding package with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "Dependency {{.output}} has been successfully deployed.\n",
-//"translation": "Dependency {{.output}} has been successfully deployed.\n"
-//},
-//{
-//"id": "Package binding {{.output}} has been successfully deployed.\n",
-//"translation": "Package binding {{.output}} has been successfully deployed.\n"
-//},
-//{
-//"id": "Package {{.output}} has been successfully deployed.\n",
-//"translation": "Package {{.output}} has been successfully deployed.\n"
-//},
-//{
-//"id": "Trigger {{.output}} has been successfully deployed.\n",
-//"translation": "Trigger {{.output}} has been successfully deployed.\n"
-//},
-//{
-//"id": "Trigger feed {{.output}} has been successfully deployed.\n",
-//"translation": "Trigger feed {{.output}} has been successfully deployed.\n"
-//},
-//{
-//"id": "Rule {{.output}} has been successfully deployed.\n",
-//"translation": "Rule {{.output}} has been successfully deployed.\n"
-//},
-//{
-//"id": "Action {{.output}} has been successfully deployed.\n",
-//"translation": "Action {{.output}} has been successfully deployed.\n"
-//},
-//{
-//"id": "Dependency {{.depName}} has been successfully undeployed.\n",
-//"translation": "Dependency {{.depName}} has been successfully undeployed.\n"
-//},
-//{
-//"id": "Trigger {{.trigger}} has been removed.\n",
-//"translation": "Trigger {{.trigger}} has been removed.\n"
-//},
-//{
-//"id": "Rule {{.rule}} has been removed.\n",
-//"translation": "Rule {{.rule}} has been removed.\n"
-//},
-//{
-//"id": "Action {{.action}} has been removed.\n",
-//"translation": "Action {{.action}} has been removed.\n"
-//},
-//{
-//"id": "Failed to invoke the feed when deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n",
-//"translation": "Failed to invoke the feed when deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n"
-//},
-//{
-//"id": "WARNING: Mandatory field Package Version must be set.\n",
-//"translation": "WARNING: Mandatory field Package Version must be set.\n"
-//},
-//{
-//"id": "WARNING: Package Version is not saved in the current wskdeploy version.\n",
-//"translation": "WARNING: Package Version is not saved in the current wskdeploy version.\n"
-//},
-//{
-//"id": "WARNING: Mandatory field Package License must be set.\n",
-//"translation": "WARNING: Mandatory field Package License must be set.\n"
-//},
-//{
-//"id": "WARNING: Package License is not saved in the current wskdeploy version.\n",
-//"translation": "WARNING: Package License is not saved in the current wskdeploy version.\n"
-//},
-//{
-//"id": "WARNING: License {{.licenseID}} is not a valid one.\n",
-//"translation": "WARNING: License {{.licenseID}} is not a valid one.\n"
-//},
-//{
-//"id": "memorySize of limits in manifest should be an integer between 128 and 512.\n",
-//"translation": "memorySize of limits in manifest should be an integer between 128 and 512.\n"
-//},
-//{
-//"id": "timeout of limits in manifest should be an integer between 100 and 300000.\n",
-//"translation": "timeout of limits in manifest should be an integer between 100 and 300000.\n"
-//},
-//{
-//"id": "logSize of limits in manifest should be an integer between 0 and 10.\n",
-//"translation": "logSize of limits in manifest should be an integer between 0 and 10.\n"
-//},
-//{
-
-//{
-//"id": "WARNING: Limits {{.limitname}} is not changable as to now, which will be ignored.\n",
-//"translation": "WARNING: Limits {{.limitname}} is not changable as to now, which will be ignored.\n"
-//},
-
-//{
-//"id": "The name of the application {{.appNameDeploy}} in deployment file at [{{.deploymentFile}}] does not match the name of the application {{.appNameManifest}}} in manifest file at [{{.manifestFile}}].",
-//"translation": "The name of the application {{.appNameDeploy}} in deployment file at [{{.deploymentFile}}] does not match the name of the application {{.appNameManifest}}} in manifest file at [{{.manifestFile}}]."
-//},
-//{
-//"id": "WARNING: application in deployment file will soon be deprecated, please use project instead.\n",
-//"translation": "WARNING: application in deployment file will soon be deprecated, please use project instead.\n"
-//},
-//{
-//"id": "WARNING: application in manifest file will soon be deprecated, please use project instead.\n",
-//"translation": "WARNING: application in manifest file will soon be deprecated, please use project instead.\n"
-//},
-//{
-//"id": "Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n",
-//"translation": "Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
-//},
-//{
-//"id": "Found the action {{.action}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
-//"translation": "Found the action {{.action}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
-//},
-//{
-//"id": "Found the trigger {{.trigger}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
-//"translation": "Found the trigger {{.trigger}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
-//},
-//{
-//"id": "Found the package {{.package}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
-//"translation": "Found the package {{.package}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
-//}
\ No newline at end of file
+var I18N_ID_SET = [](string){
+ ID_MSG_PREFIX_ERROR,
+ ID_MSG_PREFIX_SUCCESS,
+ ID_MSG_PREFIX_WARNING,
+ ID_MSG_PREFIX_INFO,
+ ID_JSON_MISSING_KEY_CMD,
+ ID_CMD_FLAG_AUTH_KEY,
+ ID_CMD_FLAG_NAMESPACE,
+ ID_CMD_FLAG_API_HOST,
+ ID_CMD_FLAG_API_VERSION,
+ ID_CMD_FLAG_KEY_FILE,
+ ID_CMD_FLAG_CERT_FILE,
+ ID_MSG_CONFIG_MISSING_AUTHKEY,
+ ID_MSG_CONFIG_MISSING_APIHOST,
+ ID_MSG_CONFIG_MISSING_NAMESPACE,
+ ID_MSG_CONFIG_INFO_APIHOST_X_host_X_source_X,
+ ID_MSG_CONFIG_INFO_AUTHKEY_X_source_X,
+ ID_MSG_CONFIG_INFO_NAMESPACE_X_namespace_X_source_X,
+ ID_MSG_UNMARSHAL_LOCAL,
+ ID_MSG_UNMARSHAL_NETWORK,
+ ID_MSG_MANIFEST_FILE_NOT_FOUND_X_path_X,
+ ID_MSG_RUNTIME_MISMATCH_X_runtime_X_ext_X_action_X,
+ ID_MSG_RUNTIME_CHANGED_X_runtime_X_action_X,
+ ID_MSG_RUNTIME_UNSUPPORTED_X_runtime_X_action_X,
+ ID_MSG_MANIFEST_DEPLOY_X_path_X,
+ ID_MSG_MANIFEST_UNDEPLOY_X_path_X,
+ ID_MSG_DEPLOYMENT_SUCCEEDED,
+ ID_MSG_DEPLOYMENT_FAILED,
+ ID_MSG_DEPLOYMENT_CANCELLED,
+ ID_MSG_ENTITY_DEPLOYING_X_key_X_name_X,
+ ID_MSG_ENTITY_UNDEPLOYING_X_key_X_name_X,
+ ID_MSG_ENTITY_DEPLOYED_SUCCESS_X_key_X_name_X,
+ ID_MSG_ENTITY_UNDEPLOYED_SUCCESS_X_key_X_name_X,
+ ID_MSG_UNDEPLOYMENT_SUCCEEDED,
+ ID_MSG_UNDEPLOYMENT_FAILED,
+ ID_MSG_UNDEPLOYMENT_CANCELLED,
+ ID_MSG_DEPENDENCY_DEPLOYING_X_name_X,
+ ID_MSG_DEPENDENCY_UNDEPLOYING_X_name_X,
+ ID_MSG_DEPENDENCY_DEPLOYMENT_SUCCESS_X_name_X,
+ ID_MSG_DEPENDENCY_DEPLOYMENT_FAILURE_X_name_X,
+ ID_MSG_DEPENDENCY_UNDEPLOYMENT_SUCCESS_X_name_X,
+ ID_MSG_DEPENDENCY_UNDEPLOYMENT_FAILURE_X_name_X,
+ ID_MSG_MANAGED_UNDEPLOYMENT_FAILED,
+ ID_MSG_MANAGED_FOUND_DELETED_X_key_X_name_X_project_X,
+ ID_MSG_PROMPT_DEPLOY,
+ ID_MSG_PROMPT_UNDEPLOY,
+ ID_MSG_PROMPT_AUTHKEY,
+ ID_MSG_PROMPT_APIHOST,
+ ID_MSG_PROMPT_NAMESPACE,
+ ID_MSG_ACTION_LIMIT_IGNORED_X_limit_X,
+ ID_WARN_DEPRECATED_KEY_REPLACED,
+ ID_WARN_WHISK_PROPS_DEPRECATED,
+ ID_ERR_GET_RUNTIMES_X_err_X,
+ ID_ERR_MISSING_MANDATORY_KEY_X_key_X,
+ ID_ERR_MISMATCH_NAME_X_key_X_dname_X_dpath_X_mname_X_moath_X,
+ ID_ERR_CREATE_ENTITY_X_key_X_err_X_code_X,
+ ID_ERR_DELETE_ENTITY_X_key_X_err_X_code_X,
+}
diff --git a/wski18n/i18n_ids_test.go b/wski18n/i18n_ids_test.go
new file mode 100644
index 0000000..dd2f07b
--- /dev/null
+++ b/wski18n/i18n_ids_test.go
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package wski18n
+
+import (
+ "testing"
+ "github.com/stretchr/testify/assert"
+)
+
+/*
+ * TestValueNotEqualKey
+ */
+func TestValueNotEqualKey(t *testing.T) {
+
+ var value string
+ for _, key := range I18N_ID_SET {
+ value = T(key)
+ assert.NotEqual(t, key, value)
+ // NOTE: uncomment the following lines to see the i18n keys and values
+ //{
+ // u := int(math.Min(20, float64(len(value))))
+ // b := value[0:u]
+ // fmt.Printf("Info: [%s] != [%s]\n", key, b)
+ //}
+ }
+}
diff --git a/wski18n/i18n_resources.go b/wski18n/i18n_resources.go
index f95aded..1317895 100644
--- a/wski18n/i18n_resources.go
+++ b/wski18n/i18n_resources.go
@@ -97,7 +97,7 @@
return a, nil
}
-var _wski18nResourcesEn_usAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x4f\x6f\xdb\x3e\x12\xbd\xe7\x53\x0c\x72\xc9\x25\x30\xda\xdf\x62\x81\x45\x6f\xc1\xf6\xcf\x66\xdb\x24\x45\x92\xb6\x28\xba\x85\x43\x4b\x63\x89\x8d\x44\x0a\x24\x95\xd4\x35\xfc\xdd\x17\x24\x25\x5b\x49\x45\x8a\x92\x65\x27\x28\x7e\x3d\x29\x96\xe6\xbd\x37\xd4\x90\x9c\xa1\xa6\xdf\x0e\x00\x96\x07\x00\x00\x87\x34\x3e\x7c\x05\x87\xb9\x4c\xa6\x85\xc0\x39\xfd\x39\x45\x21\xb8\x38\x3c\xb6\x77\x95\x20\x4c\x66\x44\x51\xce\xf4\x63\x6f\xcc\xbd\x03\x80\xd5\xb1\x07\xe1\x9e\x08\x46\x59\xe2\xc0\xf8\x52\xdd\xed\x42\x91\x65\x14\xa1\x94\x0e\x94\xab\xea\x6e\x17\x0a\x65\x73\xee\x80\x38\xd5\xb7\x9c\xf6\x3f\x24\x67\xd3\x9c\x4a\x49\x59\x32\x8d\xf2\x78\x7a\x8b\x0b\x07\xd0\x7f\xaf\x2e\xce\x81\xb2\xa2\x54\x10\x13\x45\xe0\xcc\x5a\xc1\x51\x94\xc7\x47\xa0\xed\x9c\x2c\x1a\x78\x9e\x91\x64\xca\x48\x8e\xb2\x20\x11\x3a\x38\x36\xf7\xbb\xb1\x48\xa9\x52\x8f\x5c\x7d\x9b\x0b\xfa\xcb\xfc\x00\x37\xef\xdf\x7c\xbd\x09\x01\x2d\xe8\x34\xe5\x52\x39\x40\xef\x53\x2a\x6f\xe1\xe4\xe3\x29\xdc\xfc\xe7\xe2\xea\x3a\x14\xf1\x0e\x85\xd4\x08\x9d\xa0\x9f\xdf\x5c\x5e\x9d\x5e\x9c\x87\xe0\xde\xe2\x62\x3a\xa7\x99\x6b\x24\x0b\xa2\x52\xe0\x73\x50\x29\xc2\xe4\x16\x17\x60\x9e\xed\x86\x8d\x50\xa8\x60\x5c\xfd\x70\x07\x70\x4e\x18\x9d\xa3\x54\x53\xc6\xd5\x74\xce\x4b\x16\x3b\x80\xcf\xaa\x07\x0d\x1e\x30\xae\xc0\x3c\x0d\x44\x81\xe1\xfc\xb6\x5c\x4e\xf4\xc5\x6a\xf5\x7d\xf2\x3f\xe6\x26\x2c\x4d\x28\xaf\x69\x63\x2c\x32\xee\x8a\x91\x4f\x26\x80\x1b\xc8\x30\xe7\x02\xac\x49\x8e\x4c\xf5\x21\x2a\xd9\x00\xaa\xda\xa8\x93\x4c\x94\x4c\xd1\x1c\xf5\x54\xcd\x89\x8a\x52\x07\xcb\xa5\x7d\xcc\xf0\x54\x26\x9a\x4a\x16\x18\xd1\x39\xc5\x18\x28\x83\x5a\x31\xc4\x1c\xa5\x19\x68\x83\x08\xf7\x54\xa5\x40\x22\x33\x5d\x24\x2f\x45\x84\xf6\x55\xe0\x4f\x85\x4c\x87\xaf\x41\xc5\x9f\xaa\x16\x5f\x3d\xab\x7f\xb5\x97\x5d\xaf\xa6\x76\x22\x4a\x09\x4b\xd0\x15\x08\xb5\x0f\xd5\x53\xa0\xf8\x63\x77\x66\x44\x62\x0c\x9c\x99\x20\xf4\x2a\xde\x4a\x66\xc9\x64\x59\x14\x5c\xa8\x4e\xa9\x41\xc3\x4d\xed\x60\xaf\x31\x8d\xb8\x86\x07\xe1\x02\xed\x53\xd3\x8c\xe6\x54\x4d\x69\xc2\xb8\x70\x2a\x3c\x65\x77\x24\xa3\x71\xcd\x61\x4c\x0c\x93\xb9\xd2\x62\x1f\x49\xac\xe0\x9c\xfc\xd7\x5a\x70\xa9\x52\x64\x8a\x46\x76\x6d\xd5\xab\x4b\xe5\x5c\xc4\xd9\x9c\x26\x65\x05\xd0\x2e\xa9\x0f\x82\x53\x82\x5e\x2d\xf5\x3a\xdd\x97\xd8\x6f\xe7\xa4\x5b\xef\x4b\x7d\xf9\x3a\x0c\x83\xfc\xd3\x71\x51\x50\xfd\xd7\x6a\x75\x0c\x73\xc1\xf3\xea\x27\x1b\xf3\xab\x55\xb8\xcb\x41\x50\xde\xf7\x5e\xbf\x2b\x89\xaa\x01\x50\xaa\x34\x4c\x4c\x30\x44\xd8\xab\x58\x2e\x27\xeb\xbf\x9b\x1e\xad\x7f\x0c\x53\x35\x1c\xb3\x55\xe6\x5b\x42\x33\xbb\x70\x25\xa8\xcc\x14\xdf\x4c\xfa\x6a\x99\x90\x16\xf6\xa2\x40\xf6\xc5\x6c\xff\x12\xc5\x1d\x8d\xf0\x95\x66\x42\x21\x7c\x8a\x47\x83\x6f\x15\x7f\xa5\x88\x50\x1a\xbc\x64\x39\x11\x32\x25\x99\x81\xb1\x49\x8a\xce\x33\x2d\x74\xc6\x23\x92\xc1\x1d\xc9\x4a\x94\x6e\xa9\x03\xc1\x5a\x85\x7d\xf2\x42\x50\xa6\x50\x30\x54\x6e\x2d\xe1\xf6\xad\xf4\xaf\xd7\x1b\x35\x44\x3c\x2f\x32\xd4\xc3\x5d\x65\xef\xf3\x32\xcb\x16\x6e\xe6\x20\xd3\x56\xd2\x77\x5c\x81\xa9\x54\x20\x12\x48\x94\x4e\x21\x0a\x12\xdd\x92\x04\xed\x76\x6d\xef\xe5\x28\x25\x49\x1a\x2f\x17\x08\x8b\x6b\x3b\x1e\xdb\x1b\xfa\xc2\x17\x55\x3b\xa1\x0a\x75\xaa\xda\x9e\xfe\x2c\x9f\x0a\xba\x0f\x87\xb6\xa3\x09\x75\x46\x94\xd9\x5e\x42\x6e\x4b\x9e\x0e\x77\x24\x2a\xc3\x62\xd6\x4c\x45\x54\x29\x75\x29\xb3\x63\xdf\x76\x42\x1a\xfa\xde\x94\xa0\x49\x82\x62\x1f\xaf\x6e\x7b\xaa\xbe\x4e\xcd\x11\xe3\x7d\x7a\xb6\x25\x5f\xdf\x15\x7e\x46\x59\xac\xff\xde\xe3\xaa\xb8\x3d\x65\xd7\xde\xc9\xe7\xba\xbe\x46\x16\x23\x8b\x16\xda\x34\xc6\xe2\x9c\xe8\xba\x09\x62\x1a\x57\x29\xb2\xdd\x23\xf5\x16\xb9\xde\x21\xe1\xb2\x64\x70\x73\x2f\x6f\x6d\xc1\xbc\xae\x9c\x6f\x74\x76\x21\x30\xe7\x77\x08\x05\x11\x8a\x92\x2c\x5b\x54\x25\x3c\xc6\x40\xa4\x44\xe5\x49\x50\x9e\x83\x32\xcf\x90\x35\xf6\xc6\xe5\x72\xc2\x4b\x55\x94\x6a\xb5\x82\xc9\x64\xe2\xf5\xc7\x63\xd6\x41\x66\x96\xa5\xbe\x54\xad\x46\x1d\x44\x0f\xe6\x54\x5f\x42\xaf\x71\x07\x71\x1d\xea\x7d\x39\x5d\x76\x81\x74\xf5\xcc\x1a\x4a\xeb\xb2\xef\xa0\x7f\x18\xd1\xbd\x98\x3d\xa6\xad\xa4\x17\xef\x27\xf0\x6f\xc2\x22\xcc\xb2\xca\xbc\x71\xb0\xd5\x4e\xe6\x35\xe9\x20\xd1\x06\x8f\x8f\xcf\xba\x58\xda\x6c\x1c\xb5\xc6\xe6\x21\xff\xec\xf7\x94\x1b\x3d\x20\xba\x56\x4d\xbb\x8c\x0c\xa8\x37\x5c\x86\xcf\xd7\xeb\x1a\xe1\xf7\x10\xdc\xac\xc7\xee\xf0\x0d\xb5\xee\xf6\x7f\xe8\x76\x10\x36\x34\x5b\xa0\x77\xa4\x11\x31\x66\xb8\x9f\x9a\x6a\x3c\xa6\x50\x97\x76\x9c\xa9\x8f\xc5\xf3\x77\x15\xf2\x68\x3c\x77\x5f\x85\x8c\x48\xd5\xd7\xa9\x1d\x57\x21\x63\xf3\x85\xba\xb7\xfb\x73\xa6\x11\xa9\x5a\x9d\xfa\x72\x72\x79\x7e\x7a\xfe\xee\x15\x5c\xa7\x08\x47\xf6\xd4\xf6\x08\xbe\x9e\x9c\x7d\xb0\x27\xd0\x6c\x3d\xa4\xc8\x14\x55\xe6\x4c\x3a\xc6\x42\x60\x44\x14\xc6\x13\xf8\x98\x21\x91\x08\xa5\x44\x38\xd2\x83\x7e\x04\x94\x49\x85\x44\xe7\xee\x10\xa3\x8c\x04\x9d\xd9\x6f\x3c\xd5\x07\x1f\xfb\x35\xc3\x53\x6d\x3c\xa5\xa2\xd0\xf7\x5e\x27\x9a\x7b\x7c\xff\xe3\x51\xba\xf2\xa8\xb6\x44\x36\x25\x12\x66\x88\xec\x41\x6e\xb4\xae\xcf\xbc\xd9\xd5\x30\xb8\x56\x71\x1f\x3d\xf9\xfd\x50\x85\xdb\x61\x7a\x65\x8e\x29\x6f\x04\x59\xd7\xd5\x74\x19\x43\xd6\x30\x2c\xaf\xac\xdf\xea\xd3\x6d\xb5\x0d\x00\x6c\x15\x78\xf9\xb8\x62\x1f\x2a\x6c\x00\x50\xab\xa0\x93\xdf\x4f\x2b\x86\x4a\x1a\x04\x15\xb0\x70\x6c\x32\xf4\x76\xb8\xba\xb0\x0c\x5f\x3b\xfa\x21\x76\x4d\x80\x6a\xeb\x68\xa2\x55\xd5\x5f\x50\xcc\xfb\xcd\xbd\x51\xa4\xb3\xc8\x5e\xb4\x01\x86\x1d\x51\x52\x37\x4a\xf4\x20\x0d\x34\xee\xf8\xa2\x4b\xd9\x1d\xbf\x45\x93\x46\xdb\x44\x2c\x45\xb6\xa7\x9c\x70\xcf\x22\xfc\x39\xd5\x19\x61\x31\x51\x5c\x2c\x60\x4e\x31\x8b\xa1\x5e\xd4\x3f\xdb\x56\x37\xc8\x4b\xa9\x60\x86\xba\xee\x08\xc8\x87\x7a\xa2\xf9\xa5\x3d\x36\xae\x1b\x6f\xc8\x9d\xcd\x8d\xf4\xb0\x45\xa5\x10\xba\x0e\xdf\x1c\xdb\x56\x3d\x7a\x01\x62\xb7\xc6\x1f\x36\xb2\x1f\x68\x84\x4c\xe2\x48\x23\xeb\x40\x0b\x1b\xd9\xda\x78\x57\x23\x3b\x18\xdf\x2f\xbf\x86\x35\xed\x4f\xe6\xf2\xf4\xf5\x6a\x55\xb3\x10\xb0\xad\x52\x9c\x61\x80\xd4\x5e\x58\xed\x9d\x5c\x98\x73\xb1\xb8\xa2\xbf\x50\x57\xe2\xa6\x1f\x4b\x3e\xe8\xc6\x92\x29\x2f\xb3\x58\xbf\x1c\xc2\x4c\x7f\x82\x9e\xd4\x33\x54\xf7\x7a\xc5\x7a\xf9\xd7\xbf\xcc\xf4\xfd\xe7\xcb\xbf\xdc\x6a\x47\xa5\x68\x75\x42\xd1\x1c\x79\xa9\x06\xc1\xbf\x78\x61\xe0\xff\xf1\x42\xff\x73\x3b\x31\x2a\x45\xab\x13\x19\x4f\x86\x8e\x91\xc5\x7f\xe9\x91\x3f\x12\x78\x57\x64\x1b\x64\xa8\x1b\xfb\x98\x4d\x2b\xd6\x4d\x67\x29\x61\x09\x99\x65\xa8\xeb\x44\xc5\x81\xf1\xfb\x63\xb8\x4f\xa9\xe9\xfa\xcc\x32\x4d\xdf\xe8\xfb\xeb\x8c\xfc\x11\xb9\xbc\x6d\x5e\x75\x9f\x31\x29\x8a\xac\x6e\x15\x34\xed\x6a\x26\x6d\xb2\xa7\xdc\x7a\xce\xb1\xc6\x97\x03\xdb\x01\x4a\x6c\x93\xe3\xe6\xe7\xb7\x34\x33\xad\x99\x8f\x7a\x5e\x55\x10\x53\xdd\x9a\xbc\xb2\x64\xf9\x83\x4e\xe5\x8a\xaa\xfe\xb1\x22\x72\x9d\x4f\xff\x11\xae\xf9\x63\xb1\x49\xd4\xa2\xdf\x04\x81\xe4\x9c\xe9\x48\xd8\x1c\x6e\x1c\x43\xb1\x39\xdc\x28\x04\xff\x81\x91\xaa\x4f\x37\x02\x82\x72\x37\xa4\xbd\x1c\x7d\x38\x76\x7b\x71\x73\x14\xca\xc0\x4f\x21\xb6\x6b\xcd\x9c\x4b\x51\x94\xde\xaf\x14\x10\x97\x42\x27\xa2\x39\x61\x24\xc1\xb8\xf9\x5d\x6f\x47\x9f\xf1\x9f\xad\xdc\xf6\x6a\xc2\xfc\xc7\x86\x46\xeb\x77\xb3\x26\xb1\x4b\xa5\x39\xf8\xb3\x3e\x98\xf6\xc4\x66\xe6\x53\xbf\xc3\xe5\x72\x52\x5d\xb6\x4d\xde\x35\xce\x0c\x9b\x9f\x3d\x7d\x4b\xfc\xd3\xeb\xea\x18\x2e\xd5\x56\xae\x3e\x8b\x01\x7b\x3a\x65\x1d\x43\xd6\x68\x5b\xa8\x2e\x9f\xcb\x90\x3d\x9d\x32\x3d\x64\x07\x07\xdf\x0f\xfe\x1f\x00\x00\xff\xff\x94\x9f\xee\x21\x20\x38\x00\x00")
+var _wski18nResourcesEn_usAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x59\x51\x6f\x1b\xb9\x11\x7e\xf7\xaf\x18\xe4\xc5\x2d\x60\xa8\xc9\x15\x05\x8a\x00\x45\x61\xd4\x6e\xeb\xde\xc5\x36\xec\xe4\x82\x43\x2e\x58\xd3\xcb\xd9\x15\x4f\x5c\x72\x41\x72\xa5\xe8\x04\xfd\xf7\x62\xc8\xa5\xb4\xb2\xc5\xdd\x95\xe2\x5c\xfc\xb4\x16\x87\xdf\x37\x33\x24\x67\x86\xc3\x4f\x27\x00\xab\x13\x00\x80\x57\x82\xbf\x7a\x0b\xaf\x2a\x5b\x66\xb5\xc1\x42\x7c\xc9\xd0\x18\x6d\x5e\x9d\x85\x51\x67\x98\xb2\x92\x39\xa1\x15\x89\x5d\xfa\xb1\x13\x80\xf5\x59\x0f\xc2\x82\x19\x25\x54\x99\xc0\xf8\xd8\x8e\x0e\xa1\xd8\x26\xcf\xd1\xda\x04\xca\x7d\x3b\x3a\x84\x22\x54\xa1\x13\x10\x57\x34\x94\x9c\xff\x9b\xd5\x2a\xab\x84\xb5\x42\x95\x59\x5e\xf1\x6c\x86\xcb\x04\xd0\xff\xee\x6f\xae\x41\xa8\xba\x71\xc0\x99\x63\xf0\x2e\xcc\x82\xd3\xbc\xe2\xa7\x40\xf3\x92\x2c\x04\x5c\x48\x56\x66\x8a\x55\x68\x6b\x96\x63\x82\x63\x3b\x3e\x8c\xc5\x1a\x37\xed\x51\x97\x86\xb5\x11\xbf\xfb\x1f\xe0\xe1\xc7\xcb\x5f\x1e\xc6\x80\xd6\x22\x9b\x6a\xeb\x12\xa0\x8b\xa9\xb0\x33\x38\xbf\xbd\x82\x87\xff\xde\xdc\xbf\x1f\x8b\x38\x47\x63\x09\x61\x10\xf4\xe7\xcb\xbb\xfb\xab\x9b\xeb\x31\xb8\x33\x5c\x66\x85\x90\x29\x4f\xd6\xcc\x4d\x41\x17\xe0\xa6\x08\x93\x19\x2e\xc1\xcb\x0e\xc3\xe6\x68\xdc\x68\x5c\x12\x1e\x00\xae\x8d\xae\x6a\x97\x71\xac\xa5\x4e\x2d\xd5\x85\x86\xa5\x6e\xc0\x20\x93\x72\x09\x0b\xa6\x1c\x38\x0d\x61\x0a\xb8\xa9\xb0\xff\x84\x3f\x2d\xff\x72\xfd\xe7\xb7\x30\xc8\xd3\xa8\x23\x98\xe2\xa4\x03\xb9\x68\x87\xa5\xf7\xdf\xaf\xea\x56\x22\xb3\x08\xb5\xd1\x73\xc1\x11\x98\x02\x9a\x81\xca\x89\x3c\x6c\x4a\xa7\x67\xa8\xc6\x10\xd5\xa2\x67\x4f\x3e\x23\xa2\xa5\x21\x79\x3a\x4c\x50\x68\x03\x37\x35\xaa\x8f\xb4\xc9\x46\x70\x0d\x9d\xd0\xe7\x66\xc1\x66\x0a\x7c\xe2\x58\xb0\x46\x3a\x98\x33\xd9\x20\x08\x0b\x65\x83\xd6\x7d\xee\xe3\xad\x98\x12\x05\x5a\x97\x29\xed\xb2\x42\x37\x8a\x27\x98\xdf\xb5\x82\x7e\xc3\x81\xd2\x0e\xbc\x34\x30\x07\x7e\x53\x7e\x5a\xad\x26\xf4\xb1\x5e\x7f\x9e\xfc\xaa\xd2\x84\x8d\x8f\x75\x1b\xda\xde\xfd\xf2\xc1\x47\xb8\x0e\xb2\xf7\x67\x98\x52\xa1\x72\x87\x10\x0d\x6c\xcd\xfd\x54\x71\xd2\x20\x99\x69\x94\x13\x15\x52\x2c\xaf\x98\xcb\xa7\x09\x96\xbb\x20\xe6\x79\xda\x29\x44\x65\x6b\xcc\x45\x21\x90\x83\x50\x10\x35\x06\xae\xd1\x7a\x47\x7b\x44\x58\x08\x37\x05\x96\xfb\xad\x6b\x75\x63\x72\x0c\x4b\x81\x5f\x1c\x2a\x8a\x6f\x1e\x15\xbf\xb8\xa8\x7c\x2b\x4b\xbf\x86\xcf\xa1\xa5\x89\x46\xe4\x53\xa6\x4a\x4c\x6d\x84\x68\x43\x2b\x45\x27\xf8\x89\x39\x8f\xcc\x22\x07\x3a\x61\x53\xec\xd7\xf8\xab\xd4\x6c\x94\x6d\xea\x5a\x1b\x37\xa8\xea\x28\x77\x8b\xe0\xec\x0d\xa6\x57\xae\x63\xc1\x78\x05\x83\x54\x26\x45\x25\x5c\x26\x4a\xa5\x4d\x52\xc3\x2b\x35\x67\x52\xf0\xc8\xe1\xa7\x78\x26\xff\x45\xca\x3e\x51\xb1\x85\xeb\xe5\xcf\xb5\x2a\x44\xb9\xa9\x2b\xfa\x03\xe5\x7b\xb2\x70\x37\x30\x52\xbe\x6a\xbd\x11\xa0\x9a\x43\x19\x7b\x23\x26\x31\x52\xba\x25\x91\xaf\xe3\x19\x8a\x96\xc4\xb4\x0d\x8f\x47\x51\xb5\xa6\xf4\x95\x78\x4f\xed\x59\xad\x26\xf4\xb9\x5e\x9f\x41\x61\x74\x45\xff\x87\xdd\xbf\x5e\x8f\x62\x0c\xcb\x35\xc4\x48\x62\x71\xa5\x2c\xba\xe3\xb8\x36\xce\x19\x62\xdb\xf1\xe2\x6a\x35\xd9\xfc\x7f\xb0\x95\x68\x4c\x56\xa2\x8b\xa7\x38\x55\x7a\xff\x9b\x09\x19\x82\x4b\x89\xce\x1f\xc3\xed\xc1\x8c\x53\x03\xf1\x26\xbd\x82\x45\x33\x17\x39\xbe\x25\x5d\xd0\x98\x01\x45\x1a\x55\x31\x63\xa7\x4c\xca\x4c\xea\x9c\xc9\x54\x62\x88\x62\x1d\x22\x72\x56\x20\xf7\x33\x43\xbe\xb5\x63\xd9\x14\xba\x85\x36\xb3\xa3\xf8\x84\x72\x68\x14\xf6\x27\xa3\x6d\xce\x0a\xf7\x1b\xe4\xc9\xf8\x73\xb1\x11\x85\x5c\x57\xb5\x44\xf2\x6f\x7b\x29\x2a\x1a\x29\x97\x63\x89\x0a\xbf\x5e\xc3\x2c\x5c\xf0\xf6\x14\x06\x36\x22\xdb\x70\xc1\x5d\xa3\xe0\x61\x61\x67\x6d\x41\x18\xd3\xef\x03\xed\x03\x83\x95\x9e\x23\xd4\xcc\x38\xe1\xeb\xc7\x30\x86\x1c\x98\xb5\xe8\xfa\xdd\xdf\xd1\x34\x67\x2a\x47\x99\x56\xf6\xe6\xc7\x09\xfc\x2b\xc8\x50\x49\x30\xb6\xda\x50\x07\x78\xfd\x43\x47\xf8\x18\xbf\xef\x90\xf5\x7a\x7e\x87\xa9\xd7\xf7\xa3\xf9\x0e\xf4\xdf\xe8\x12\x6a\x87\xa4\x62\x8a\x95\xc8\x0f\x30\x4e\x17\xc0\x31\xf8\x91\x52\x99\x13\x68\x7b\x0d\x06\xde\x18\xd2\xaf\x65\xea\xae\xf3\xb7\xdb\x86\x0b\x66\x54\xe6\x2f\x9c\x54\xf0\xd7\x68\x48\xcd\x9e\xb0\x4b\x95\xc0\x0c\x97\x54\x07\x50\xa8\x5f\x30\x0b\x06\x9d\x11\x38\xa7\xfa\x84\x02\x82\x07\x9b\x6c\xc1\xe8\x07\x5f\x2c\x4a\x09\x56\x6b\x05\x8f\x48\x1a\x1a\xcc\x19\xb9\xa6\x0e\xb7\x07\xae\xbd\x5f\x1a\x8b\x20\x1c\xe8\xc6\x59\xba\x4b\xe8\x02\xde\x1b\x36\x17\x16\x1e\x1b\x21\xf9\x08\x53\x28\x4f\x6d\xd1\x33\x83\xb5\x64\x79\x72\xbd\xa2\x45\x5a\xf2\x8e\x51\x22\xd4\x89\xab\xd5\x84\x8a\x43\xb7\xac\x71\xbd\x0e\x75\x62\xc2\x88\xb3\x68\x05\xa9\xef\x5a\x4c\x85\x8b\x1d\x4c\xeb\x90\xed\x26\xf8\xa7\x49\x28\x16\x11\x15\x53\x9c\x39\x6d\x96\x3d\xdd\x0c\xd2\x7c\x23\xe7\x19\x3a\x2b\x23\x2c\xb4\x58\x93\xfe\xb4\x17\x2f\x07\x3e\xed\xd2\x06\xf8\x0d\xf3\xbe\x22\x29\x52\xf8\xec\xcb\x3d\x25\xa7\xcf\xb6\x2c\xec\x6c\x7e\xef\x2e\x3f\x1e\x6f\x2f\x4f\x2e\x0f\xae\xcd\xe1\x5e\xa8\xea\x80\x54\x3b\xd7\x3a\x3f\x1a\x6f\x71\x43\xd1\x94\x9c\xc7\xb1\x46\xc5\x51\xe5\xc9\x2b\x7f\x14\x85\xad\x68\x58\xb0\xa0\xc3\x64\xd2\xc3\x13\x0f\xde\x28\xa6\x0f\x5b\xe1\x63\xb8\xb6\x53\x9e\xe5\xcf\x64\x7f\xf0\x62\x2f\x0d\x4c\x99\x85\x47\x44\xb5\x13\xd0\x37\x71\x62\x28\x4f\xed\xd1\x82\xa2\x60\x63\x52\x55\xee\xc5\x93\x20\xb8\x57\xa7\xef\x97\x77\xa3\x3d\xcf\x33\xe4\xcb\xf8\x35\xe2\x8e\xf7\xec\xb3\xf4\x99\xf6\xed\xf3\x14\x73\xb8\x77\xfb\xb4\xda\xe4\x39\xdd\x28\x9e\xb5\x09\x2c\xf3\x09\x2c\x7d\xa2\x24\x3a\xda\xe4\x9b\xf0\xd0\xd5\xa4\x0d\xff\x3e\x51\xd0\xba\xb5\x69\x82\xce\x7f\xde\x18\x43\x66\xc4\x8c\xd7\x06\xa0\xd0\xf4\x08\xdf\x84\xc0\xac\x5f\x6b\xb2\x76\x74\xee\xa6\xe8\x96\x1b\x64\x0e\xfb\x75\xf7\xad\x7d\xf0\x92\x3b\x16\xf8\xde\x86\x7f\x13\x80\x0a\xad\x65\x65\xa7\x88\x07\xa6\x78\x3b\x96\x6b\x1e\x06\xe8\x63\xc4\x3d\x23\xf8\x73\x8c\x4a\xfc\x99\x53\xbf\x85\x4a\x5e\x8f\x6d\xf4\x1c\x0c\x99\x7b\x57\xb8\x37\x8a\xb5\x14\x9d\xc0\x39\x22\x5a\x1e\x4d\x13\x0f\xde\xc0\x71\xde\x8b\xff\x15\x41\xf2\x89\x91\x2f\xc9\x3f\x22\x98\xdc\x5f\xde\x9e\xdf\x9d\xbf\xbf\xb9\x4b\xb0\xfd\x63\xef\x1f\x5c\x2a\xaa\xdb\x88\x53\xea\x85\x6f\x75\x83\x14\x0a\x81\x99\xd0\x4d\x9d\xa3\x09\x3d\xa9\xfd\xf3\x77\xfe\xf6\x2b\xf6\xf1\xfc\xee\xfa\xea\xfa\x3f\x6f\x81\x6a\x87\xd3\x70\x19\x3f\x85\x5f\xce\xdf\xfd\xb4\xa9\xb3\x8c\x28\x4b\x34\xa1\x40\xf6\x9d\x83\x6d\x55\x35\x81\xdb\x6d\x55\x75\x5a\x20\xf2\xd3\x58\x46\x51\x48\xe0\x68\x73\x23\x1e\x43\xcf\xac\x6d\xa0\x85\x76\x91\x4f\x00\x89\x57\xb8\xef\xa8\xd1\x5e\x17\x6d\xbb\x0a\x42\xcd\xf5\x2c\x94\x8f\x84\x0c\x8b\x29\xaa\x6d\x14\x88\x6a\x85\xa1\xa3\x23\xc1\x50\x6b\xe3\x0f\x51\xa2\x7f\xaf\xbc\xdb\x54\xb5\x85\x40\xc9\xe1\x96\xe5\x33\x56\x22\xfc\x1c\xde\xcc\xa0\x6a\xac\xa3\xf2\xdb\x86\x9e\xc3\xc0\x3a\x1f\x88\xd6\xaf\xda\xd3\xc9\xb1\x41\xcb\xe6\x61\xcd\xbb\x39\x6d\x5b\xbb\xb4\x8f\x7d\x23\x94\xfd\x6a\xfc\xe3\x3c\xfb\x93\xc8\x51\x59\x7c\x21\xcf\x26\xd0\xc6\x79\x36\x4e\xfe\x56\x9e\x3d\x1a\xbf\x5f\xfd\x08\xeb\xdb\xe4\xfe\xf3\xea\x62\xbd\x8e\x2c\x0c\x42\x4b\x5d\x2b\x1c\xa1\xea\x41\x58\xfb\x33\x12\x56\xda\x2c\xef\xc5\xef\xfe\x02\xed\xfb\xf6\x76\xe7\x66\x65\xa7\xba\x91\x9c\x16\x87\x29\xdf\xc0\xa3\x43\xfd\x88\x6e\x41\xd9\xe7\xcd\x0f\x7f\xf7\xc7\xf7\x6f\x6f\x7e\x48\x6b\xfb\xa2\x14\x7b\x8d\x70\xa2\x42\xdd\xb8\xa3\xe0\x5f\xbf\xf6\xf0\x7f\x7d\x4d\x7f\x69\x23\x5e\x94\x62\xaf\x11\x52\x97\xc7\xfa\x28\xe0\xbf\xe9\x51\xff\x85\xc0\x87\x76\xb6\x47\x86\xf8\x00\x14\x8a\x15\xd8\x3c\x5d\x4c\x99\x2a\xd9\xa3\x44\xca\x7f\x4e\x83\xd2\x8b\xb3\x6e\xc3\xe7\x11\xbb\xef\x43\x83\x3b\xff\x05\xb9\xfa\xcd\x62\x75\x2d\xe3\xe3\xd2\x9e\xc6\xc5\x98\x3e\x4f\xbc\xac\x74\x3a\x3b\x03\xf6\x7d\x1b\x52\x32\xf4\xe4\xf3\xc9\xff\x03\x00\x00\xff\xff\xd0\x41\x36\x4c\xdc\x24\x00\x00")
func wski18nResourcesEn_usAllJsonBytes() ([]byte, error) {
return bindataRead(
@@ -112,7 +112,7 @@
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 14368, mode: os.FileMode(420), modTime: time.Unix(1515166936, 0)}
+ info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 9436, mode: os.FileMode(420), modTime: time.Unix(1515552461, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
diff --git a/wski18n/resources/en_US.all.json b/wski18n/resources/en_US.all.json
index dcdd75e..eafe7bd 100644
--- a/wski18n/resources/en_US.all.json
+++ b/wski18n/resources/en_US.all.json
@@ -44,6 +44,26 @@
"translation": "path of the .cert file"
},
{
+ "id": "msg_prompt_deploy",
+ "translation": "Do you really want to deploy this? (y/N): "
+ },
+ {
+ "id": "msg_prompt_undeploy",
+ "translation": "Do you really want to undeploy this? (y/N): "
+ },
+ {
+ "id": "msg_prompt_authkey",
+ "translation": "\nPlease provide an authentication token: "
+ },
+ {
+ "id": "msg_prompt_apihost",
+ "translation": "\nPlease provide the hostname for OpenWhisk: "
+ },
+ {
+ "id": "msg_prompt_namespace",
+ "translation": "\nPlease provide a namespace [default value is guest]: "
+ },
+ {
"id": "msg_manifest_not_found",
"translation": "Manifest file not found at path [{{.path}}].\n"
},
@@ -72,210 +92,145 @@
"translation": "Invalid action limit [{{.limit}}] in manifest is ignored.\n"
},
{
- "id": "The authentication key is not configured.\n",
+ "id": "msg_config_missing_authkey",
"translation": "The authentication key is not configured.\n"
},
{
- "id": "The API host is not configured.\n",
+ "id": "msg_config_missing_apihost",
"translation": "The API host is not configured.\n"
},
{
- "id": "The namespace is not configured.\n",
+ "id": "msg_config_missing_namespace",
"translation": "The namespace is not configured.\n"
},
{
- "id": "The API host is {{.apihost}}, from {{.apisource}}.\n",
- "translation": "The API host is {{.apihost}}, from {{.apisource}}.\n"
+ "id": "msg_config_apihost_info",
+ "translation": "The API host is {{.host}}, from {{.source}}.\n"
},
{
- "id": "The auth key is set, from {{.authsource}}.\n",
- "translation": "The auth key is set, from {{.authsource}}.\n"
+ "id": "msg_config_authkey_info",
+ "translation": "The auth key is set, from {{.source}}.\n"
},
{
- "id": "The namespace is {{.namespace}}, from {{.namespacesource}}.\n",
- "translation": "The namespace is {{.namespace}}, from {{.namespacesource}}.\n"
+ "id": "msg_config_namespace_info",
+ "translation": "The namespace is {{.namespace}}, from {{.source}}.\n"
},
{
- "id": "Failed to get the supported runtimes from OpenWhisk service: {{.err}}.\n",
+ "id": "msg_err_get_runtimes",
"translation": "Failed to get the supported runtimes from OpenWhisk service: {{.err}}.\n"
},
{
- "id": "Start to unmarshal Openwhisk info from local values.\n",
- "translation": "Start to unmarshal Openwhisk info from local values.\n"
+ "id": "msg_unmarshall_local",
+ "translation": "Unmarshal OpenWhisk info from local values.\n"
},
{
- "id": "Unmarshal Openwhisk info from internet.\n",
- "translation": "Unmarshal Openwhisk info from internet.\n"
+ "id": "msg_unmarshall_network",
+ "translation": "Unmarshal OpenWhisk info from internet.\n"
},
{
- "id": "Deployment completed successfully.\n",
+ "id": "msg_deployment_succeeded",
"translation": "Deployment completed successfully.\n"
},
{
- "id": "Got error creating package with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error creating package with error message: {{.err}} and error code: {{.code}}.\n"
+ "id": "msg_deployment_failed",
+ "translation": "Deployment did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
},
{
- "id": "Got error creating action with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error creating package with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Got error creating api with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error creating api with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Got error creating rule with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error creating rule with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Got error creating trigger with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error creating trigger with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Got error creating trigger feed with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error creating trigger feed with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Got error creating package binding with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error creating package binding with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Deployment of dependency {{.depName}} did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n",
- "translation": "Deployment of dependency {{.depName}} did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
- },
- {
- "id": "Deploying action {{.output}} ...",
- "translation": "Deploying action {{.output}} ..."
- },
- {
- "id": "Deploying rule {{.output}} ...",
- "translation": "Deploying rule {{.output}} ..."
- },
- {
- "id": "Deploying trigger feed {{.output}} ...",
- "translation": "Deploying trigger feed {{.output}} ..."
- },
- {
- "id": "Deploying package {{.output}} ...",
- "translation": "Deploying package {{.output}} ..."
- },
- {
- "id": "Deploying package binding {{.output}} ...",
- "translation": "Deploying package binding {{.output}} ..."
- },
- {
- "id": "Deploying dependency {{.output}} ...",
- "translation": "Deploying dependency {{.output}} ..."
- },
- {
- "id": "OK. Cancelling deployment.\n",
+ "id": "msg_deployment_cancelled",
"translation": "OK. Cancelling deployment.\n"
},
{
- "id": "OK. Canceling undeployment.\n",
- "translation": "OK. Canceling undeployment.\n"
+ "id": "msg_undeployment_succeeded",
+ "translation": "Undeployment completed successfully.\n"
},
{
- "id": "Undeployment did not complete sucessfully.\n",
+ "id": "msg_undeployment_failed",
"translation": "Undeployment did not complete sucessfully.\n"
},
{
- "id": "Deployment removed successfully.\n",
- "translation": "Deployment removed successfully.\n"
+ "id": "msg_undeployment_cancelled",
+ "translation": "OK. Cancelling undeployment.\n"
},
{
- "id": "Undeployment did not complete sucessfully.\n",
- "translation": "Undeployment did not complete sucessfully.\n"
+ "id": "msg_undeployment_managed_failed",
+ "translation": "Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
},
{
- "id": "Undeploying dependency {{.depName}} ...",
- "translation": "Undeploying dependency {{.depName}} ..."
+ "id": "msg_warn_whisk_properties",
+ "translation": "The [{{.key}}] key was retrieved from whisk.properties which will soon be deprecated please do not use it outside of Travis builds.\n"
},
{
- "id": "Undeployment of dependency {{.depName}} did not complete sucessfully.\n",
- "translation": "Undeployment of dependency {{.depName}} did not complete sucessfully.\n"
+ "id": "msg_warn_key_deprecated_replaced",
+ "translation": "The [{{.oldkey}}] key in the {{.filetype}} file will soon be deprecated, please use the [{{.newkey}}] key instead.\n"
+ },
+ { "id": "msg_err_missing_mandatory_key",
+ "translation": "The mandatory key [{{.key}}] is missing."
},
{
- "id": "Got error deleting action with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error deleting action with error message: {{.err}} and error code: {{.code}}.\n"
+ "id": "msg_err_mismatch_name_project",
+ "translation": "The {{.key}} named [{{.dname}}] in deployment file [{{.dpath}}] does not match the name [{{.mname}}] in manifest file [{{.mpath}}]."
},
{
- "id": "Got error deleting rule with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error deleting rule with error message: {{.err}} and error code: {{.code}}.\n"
+ "id": "msg_deploying_dependency",
+ "translation": "Deploying dependency [{{.name}}]..."
},
{
- "id": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error setting the status of rule with error message: {{.err}} and error code: {{.code}}.\n"
+ "id": "msg_undeploying_dependency",
+ "translation": "Undeploying dependency [{{.name}}]..."
},
{
- "id": "Got error deleting trigger with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error deleting trigger with error message: {{.err}} and error code: {{.code}}.\n"
+ "id": "msg_dependency_deployment_success",
+ "translation": "Dependency [{{.name}}] has been successfully deployed.\n"
},
{
- "id": "Got error deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n"
+ "id": "msg_dependency_deployment_failure",
+ "translation": "Deployment of dependency [{{.name}}] did not complete sucessfully. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
},
{
- "id": "Got error deleting package with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error deleting package with error message: {{.err}} and error code: {{.code}}.\n"
+ "id": "msg_dependency_undeployment_success",
+ "translation": "Dependency [{{.name}}] has been successfully undeployed.\n"
+ },
+ {
+ "id": "msg_dependency_undeployment_failure",
+ "translation": "Undeployment of dependency [{{.name}}] did not complete sucessfully.\n"
+ },
+ {
+ "id": "msg_managed_found_deleted_entity",
+ "translation": "Deleting {{.key}} [{{.name}}] which was removed from the current managed project [{{.project}}] as part of undeployment.\n"
+ },
+ {
+ "id": "msg_err_create_entity",
+ "translation": "Error creating {{.key}} with error message: {{.err}} and error code: {{.code}}.\n"
+ },
+ {
+ "id": "msg_err_delete_entity",
+ "translation": "Error deleting {{.key}} with error message: {{.err}} and error code: {{.code}}.\n"
+ },
+ {
+ "id": "msg_entity_deploying",
+ "translation": "Deploying {{.key}} [{{.name}}] ..."
+ },
+ {
+ "id": "msg_entity_undeploying",
+ "translation": "Undeploying {{.key}} [{{.name}}] ..."
+ },
+ {
+ "id": "msg_entity_deployed_success",
+ "translation": "{{.key}} [{{.name}}] has been successfully deployed.\n"
+ },
+ {
+ "id": "msg_entity_undeployed_success",
+ "translation": "{{.key}} [{{.name}}] has been successfully undeployed.\n"
+ },
+ {
+ "id": "SEPARATOR",
+ "translation": "====================== Entries below this line are not verified ==================================="
},
{
"id": "WARNING: The 'source' YAML key in trigger entity is deprecated. Please use 'feed' instead as described in specifications.\n",
"translation": "WARNING: The 'source' YAML key in trigger entity is deprecated. Please use 'feed' instead as described in specifications.\n"
},
{
- "id": "Got error deleting binding package with error message: {{.err}} and error code: {{.code}}.\n",
- "translation": "Got error deleting binding package with error message: {{.err}} and error code: {{.code}}.\n"
- },
- {
- "id": "Dependency {{.output}} has been successfully deployed.\n",
- "translation": "Dependency {{.output}} has been successfully deployed.\n"
- },
- {
- "id": "Package binding {{.output}} has been successfully deployed.\n",
- "translation": "Package binding {{.output}} has been successfully deployed.\n"
- },
- {
- "id": "Package {{.output}} has been successfully deployed.\n",
- "translation": "Package {{.output}} has been successfully deployed.\n"
- },
- {
- "id": "Trigger {{.output}} has been successfully deployed.\n",
- "translation": "Trigger {{.output}} has been successfully deployed.\n"
- },
- {
- "id": "Trigger feed {{.output}} has been successfully deployed.\n",
- "translation": "Trigger feed {{.output}} has been successfully deployed.\n"
- },
- {
- "id": "Rule {{.output}} has been successfully deployed.\n",
- "translation": "Rule {{.output}} has been successfully deployed.\n"
- },
- {
- "id": "Action {{.output}} has been successfully deployed.\n",
- "translation": "Action {{.output}} has been successfully deployed.\n"
- },
- {
- "id": "Dependency {{.depName}} has been successfully undeployed.\n",
- "translation": "Dependency {{.depName}} has been successfully undeployed.\n"
- },
- {
- "id": "Trigger {{.trigger}} has been removed.\n",
- "translation": "Trigger {{.trigger}} has been removed.\n"
- },
- {
- "id": "Rule {{.rule}} has been removed.\n",
- "translation": "Rule {{.rule}} has been removed.\n"
- },
- {
- "id": "Action {{.action}} has been removed.\n",
- "translation": "Action {{.action}} has been removed.\n"
- },
- {
"id": "Failed to invoke the feed when deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n",
"translation": "Failed to invoke the feed when deleting trigger feed with error message: {{.err}} and error code: {{.code}}.\n"
},
@@ -316,32 +271,7 @@
"translation": "WARNING: Limits {{.limitname}} is not changable as to now, which will be ignored.\n"
},
{
- "id": "The name of the application {{.appNameDeploy}} in deployment file at [{{.deploymentFile}}] does not match the name of the application {{.appNameManifest}}} in manifest file at [{{.manifestFile}}].",
- "translation": "The name of the application {{.appNameDeploy}} in deployment file at [{{.deploymentFile}}] does not match the name of the application {{.appNameManifest}}} in manifest file at [{{.manifestFile}}]."
- },
- {
"id": "WARNING: application in deployment file will soon be deprecated, please use project instead.\n",
"translation": "WARNING: application in deployment file will soon be deprecated, please use project instead.\n"
- },
- {
- "id": "WARNING: application in manifest file will soon be deprecated, please use project instead.\n",
- "translation": "WARNING: application in manifest file will soon be deprecated, please use project instead.\n"
- },
- {
- "id": "Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n",
- "translation": "Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
- },
- {
- "id": "Found the action {{.action}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
- "translation": "Found the action {{.action}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
- },
- {
- "id": "Found the trigger {{.trigger}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
- "translation": "Found the trigger {{.trigger}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
- },
- {
- "id": "Found the package {{.package}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
- "translation": "Found the package {{.package}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
}
-
]