Adding support for project (#627)
diff --git a/deployers/deploymentreader.go b/deployers/deploymentreader.go
index 9141adb..d9e5759 100644
--- a/deployers/deploymentreader.go
+++ b/deployers/deploymentreader.go
@@ -63,23 +63,23 @@
packMap := make(map[string]parsers.Package)
- if reader.DeploymentDescriptor.Application.Packages == nil {
+ if reader.DeploymentDescriptor.GetProject().Packages == nil {
// a single package is specified in deployment YAML file with "package" key
- if len(reader.DeploymentDescriptor.Application.Package.Packagename) != 0 {
- packMap[reader.DeploymentDescriptor.Application.Package.Packagename] = reader.DeploymentDescriptor.Application.Package
- utils.PrintOpenWhiskOutputln("WARNING: The package YAML key in deployment file will soon be deprecated. Please use packages instead as described in specifications.")
- } else {
- if reader.DeploymentDescriptor.Packages != nil {
- for packName, depPacks := range reader.DeploymentDescriptor.Packages {
- depPacks.Packagename = packName
- packMap[packName] = depPacks
- }
- } else {
- packMap[reader.DeploymentDescriptor.Package.Packagename] = reader.DeploymentDescriptor.Package
- }
- }
+ if len(reader.DeploymentDescriptor.GetProject().Package.Packagename) != 0 {
+ packMap[reader.DeploymentDescriptor.GetProject().Package.Packagename] = reader.DeploymentDescriptor.GetProject().Package
+ utils.PrintOpenWhiskOutputln("WARNING: The package YAML key in deployment file will soon be deprecated. Please use packages instead as described in specifications.")
+ } else {
+ if reader.DeploymentDescriptor.Packages != nil {
+ for packName, depPacks := range reader.DeploymentDescriptor.Packages {
+ depPacks.Packagename = packName
+ packMap[packName] = depPacks
+ }
+ } else {
+ packMap[reader.DeploymentDescriptor.Package.Packagename] = reader.DeploymentDescriptor.Package
+ }
+ }
} else {
- for packName, depPacks := range reader.DeploymentDescriptor.Application.Packages {
+ for packName, depPacks := range reader.DeploymentDescriptor.GetProject().Packages {
depPacks.Packagename = packName
packMap[packName] = depPacks
}
@@ -90,7 +90,7 @@
serviceDeployPack := reader.serviceDeployer.Deployment.Packages[packName]
if serviceDeployPack == nil {
- utils.PrintOpenWhiskOutputln("WARNING: Package name in deployment file " + packName + " does not match with manifest file.")
+ utils.PrintOpenWhiskOutputln("WARNING: Package name in deployment file " + packName + " does not match with manifest file.")
break
}
@@ -143,22 +143,22 @@
packMap := make(map[string]parsers.Package)
- if reader.DeploymentDescriptor.Application.Packages == nil {
+ if reader.DeploymentDescriptor.GetProject().Packages == nil {
// a single package is specified in deployment YAML file with "package" key
- if len(reader.DeploymentDescriptor.Application.Package.Packagename) != 0 {
- packMap[reader.DeploymentDescriptor.Application.Package.Packagename] = reader.DeploymentDescriptor.Application.Package
- } else {
- if reader.DeploymentDescriptor.Packages != nil {
- for packName, depPacks := range reader.DeploymentDescriptor.Packages {
- depPacks.Packagename = packName
- packMap[packName] = depPacks
- }
- } else {
- packMap[reader.DeploymentDescriptor.Package.Packagename] = reader.DeploymentDescriptor.Package
- }
- }
+ if len(reader.DeploymentDescriptor.GetProject().Package.Packagename) != 0 {
+ packMap[reader.DeploymentDescriptor.GetProject().Package.Packagename] = reader.DeploymentDescriptor.GetProject().Package
+ } else {
+ if reader.DeploymentDescriptor.Packages != nil {
+ for packName, depPacks := range reader.DeploymentDescriptor.Packages {
+ depPacks.Packagename = packName
+ packMap[packName] = depPacks
+ }
+ } else {
+ packMap[reader.DeploymentDescriptor.Package.Packagename] = reader.DeploymentDescriptor.Package
+ }
+ }
} else {
- for packName, depPacks := range reader.DeploymentDescriptor.Application.Packages {
+ for packName, depPacks := range reader.DeploymentDescriptor.GetProject().Packages {
depPacks.Packagename = packName
packMap[packName] = depPacks
}
@@ -227,21 +227,21 @@
packMap := make(map[string]parsers.Package)
- if reader.DeploymentDescriptor.Application.Packages == nil {
- if len(reader.DeploymentDescriptor.Application.Package.Packagename) != 0 {
- packMap[reader.DeploymentDescriptor.Application.Package.Packagename] = reader.DeploymentDescriptor.Application.Package
- } else {
- if reader.DeploymentDescriptor.Packages != nil {
- for packName, depPacks := range reader.DeploymentDescriptor.Packages {
- depPacks.Packagename = packName
- packMap[packName] = depPacks
- }
- } else {
- packMap[reader.DeploymentDescriptor.Package.Packagename] = reader.DeploymentDescriptor.Package
- }
- }
+ if reader.DeploymentDescriptor.GetProject().Packages == nil {
+ if len(reader.DeploymentDescriptor.GetProject().Package.Packagename) != 0 {
+ packMap[reader.DeploymentDescriptor.GetProject().Package.Packagename] = reader.DeploymentDescriptor.GetProject().Package
+ } else {
+ if reader.DeploymentDescriptor.Packages != nil {
+ for packName, depPacks := range reader.DeploymentDescriptor.Packages {
+ depPacks.Packagename = packName
+ packMap[packName] = depPacks
+ }
+ } else {
+ packMap[reader.DeploymentDescriptor.Package.Packagename] = reader.DeploymentDescriptor.Package
+ }
+ }
} else {
- for packName, depPacks := range reader.DeploymentDescriptor.Application.Packages {
+ for packName, depPacks := range reader.DeploymentDescriptor.GetProject().Packages {
depPacks.Packagename = packName
packMap[packName] = depPacks
}
@@ -273,7 +273,7 @@
}
for _, keyVal := range wskTrigger.Parameters {
- utils.PrintOpenWhiskOutputln("Checking key " + keyVal.Key)
+ utils.PrintOpenWhiskOutputln("Checking key " + keyVal.Key)
if _, exists := depParams[keyVal.Key]; !exists {
keyValArr = append(keyValArr, keyVal)
}
diff --git a/deployers/deploymentreader_test.go b/deployers/deploymentreader_test.go
index 458ebe2..53e326b 100644
--- a/deployers/deploymentreader_test.go
+++ b/deployers/deploymentreader_test.go
@@ -41,7 +41,7 @@
// Check DeploymentReader could handle deployment yaml successfully.
func TestDeploymentReader_HandleYaml(t *testing.T) {
dr.HandleYaml()
- assert.NotNil(t, dr.DeploymentDescriptor.Application.Packages["GitHubCommits"], "DeploymentReader handle deployment yaml failed.")
+ assert.NotNil(t, dr.DeploymentDescriptor.GetProject().Packages["GitHubCommits"], "DeploymentReader handle deployment yaml failed.")
}
func TestDeployerCheck(t *testing.T) {
diff --git a/deployers/servicedeployer.go b/deployers/servicedeployer.go
index c340a3e..8bc8b64 100644
--- a/deployers/servicedeployer.go
+++ b/deployers/servicedeployer.go
@@ -33,15 +33,15 @@
"reflect"
)
-type DeploymentApplication struct {
+type DeploymentProject struct {
Packages map[string]*DeploymentPackage
Triggers map[string]*whisk.Trigger
Rules map[string]*whisk.Rule
Apis map[string]*whisk.ApiCreateRequest
}
-func NewDeploymentApplication() *DeploymentApplication {
- var dep DeploymentApplication
+func NewDeploymentProject() *DeploymentProject {
+ var dep DeploymentProject
dep.Packages = make(map[string]*DeploymentPackage)
dep.Triggers = make(map[string]*whisk.Trigger)
dep.Rules = make(map[string]*whisk.Rule)
@@ -71,7 +71,7 @@
// 3. Collect information about the source code files in the working directory
// 4. Create a deployment plan to create OpenWhisk service
type ServiceDeployer struct {
- Deployment *DeploymentApplication
+ Deployment *DeploymentProject
Client *whisk.Client
mt sync.RWMutex
RootPackageName string
@@ -90,7 +90,7 @@
// NewServiceDeployer is a Factory to create a new ServiceDeployer
func NewServiceDeployer() *ServiceDeployer {
var dep ServiceDeployer
- dep.Deployment = NewDeploymentApplication()
+ dep.Deployment = NewDeploymentProject()
dep.IsInteractive = true
dep.DeployActionInPackage = true
dep.DependencyMaster = make(map[string]utils.DependencyRecord)
@@ -139,9 +139,15 @@
return err
}
- applicationName := ""
- if len(manifest.Application.Packages) != 0 {
- applicationName = manifest.Application.Name
+ projectName := ""
+ if len(manifest.GetProject().Packages) != 0 {
+ projectName = manifest.GetProject().Name
+ }
+
+ // (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)
}
// process deployment file
@@ -152,24 +158,30 @@
if err != nil {
return err
}
- // compare the name of the application
- if len(deploymentReader.DeploymentDescriptor.Application.Packages) != 0 && len(applicationName) != 0 {
- appNameDeploy := deploymentReader.DeploymentDescriptor.Application.Name
- if appNameDeploy != applicationName {
- errorString := wski18n.T("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}}].",
- map[string]interface{}{"appNameDeploy": appNameDeploy, "deploymentFile": deployer.DeploymentPath,
- "appNameManifest": applicationName, "manifestFile": deployer.ManifestPath })
+
+ // (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)
+ }
+
+ // compare the name of the project/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 project/application {{.projectNameManifest}}} in manifest file at [{{.manifestFile}}].",
+ map[string]interface{}{"projectNameDeploy": projectNameDeploy, "deploymentFile": deployer.DeploymentPath,
+ "projectNameManifest": projectName, "manifestFile": deployer.ManifestPath})
return utils.NewInputYamlFormatError(errorString)
}
}
-
deploymentReader.BindAssets()
}
return err
}
-func (deployer *ServiceDeployer) ConstructUnDeploymentPlan() (*DeploymentApplication, error) {
+func (deployer *ServiceDeployer) ConstructUnDeploymentPlan() (*DeploymentProject, error) {
var manifestReader = NewManfiestReader(deployer)
manifestReader.IsUndeploy = true
@@ -203,10 +215,16 @@
return deployer.Deployment, err
}
- applicationName := ""
- if len(manifest.Application.Packages) != 0 {
- applicationName = manifest.Application.Name
- }
+ projectName := ""
+ if len(manifest.GetProject().Packages) != 0 {
+ projectName = manifest.GetProject().Name
+ }
+
+ // (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)
+ }
// process deployment file
if utils.FileExists(deployer.DeploymentPath) {
@@ -215,16 +233,21 @@
if err != nil {
return deployer.Deployment, err
}
- // compare the name of the application
- if len(deploymentReader.DeploymentDescriptor.Application.Packages) != 0 && len(applicationName) != 0 {
- appNameDeploy := deploymentReader.DeploymentDescriptor.Application.Name
- if appNameDeploy != applicationName {
- errorString := wski18n.T("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}}].",
- map[string]interface{}{"appNameDeploy": appNameDeploy, "deploymentFile": deployer.DeploymentPath,
- "appNameManifest": applicationName, "manifestFile": deployer.ManifestPath })
- return deployer.Deployment, utils.NewInputYamlFormatError(errorString)
- }
- }
+ // (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)
+ }
+ // 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})
+ return deployer.Deployment, utils.NewInputYamlFormatError(errorString)
+ }
+ }
deploymentReader.BindAssets()
}
@@ -590,8 +613,8 @@
deployer.Client.Namespace = namespace
if err != nil {
- // Remove the created trigger
- deployer.Client.Triggers.Delete(trigger.Name)
+ // Remove the created trigger
+ deployer.Client.Triggers.Delete(trigger.Name)
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)})
@@ -685,7 +708,7 @@
return nil
}
-func (deployer *ServiceDeployer) UnDeploy(verifiedPlan *DeploymentApplication) error {
+func (deployer *ServiceDeployer) UnDeploy(verifiedPlan *DeploymentProject) error {
if deployer.IsInteractive == true {
deployer.printDeploymentAssets(verifiedPlan)
reader := bufio.NewReader(os.Stdin)
@@ -729,7 +752,7 @@
}
-func (deployer *ServiceDeployer) unDeployAssets(verifiedPlan *DeploymentApplication) error {
+func (deployer *ServiceDeployer) unDeployAssets(verifiedPlan *DeploymentProject) error {
if err := deployer.UnDeployActions(verifiedPlan); err != nil {
return err
@@ -813,7 +836,7 @@
return nil
}
-func (deployer *ServiceDeployer) UnDeployPackages(deployment *DeploymentApplication) error {
+func (deployer *ServiceDeployer) UnDeployPackages(deployment *DeploymentProject) error {
for _, pack := range deployment.Packages {
err := deployer.deletePackage(pack.Package)
if err != nil {
@@ -823,7 +846,7 @@
return nil
}
-func (deployer *ServiceDeployer) UnDeploySequences(deployment *DeploymentApplication) error {
+func (deployer *ServiceDeployer) UnDeploySequences(deployment *DeploymentProject) error {
for _, pack := range deployment.Packages {
for _, action := range pack.Sequences {
@@ -837,7 +860,7 @@
}
// DeployActions into OpenWhisk
-func (deployer *ServiceDeployer) UnDeployActions(deployment *DeploymentApplication) error {
+func (deployer *ServiceDeployer) UnDeployActions(deployment *DeploymentProject) error {
for _, pack := range deployment.Packages {
for _, action := range pack.Actions {
@@ -851,7 +874,7 @@
}
// Deploy Triggers into OpenWhisk
-func (deployer *ServiceDeployer) UnDeployTriggers(deployment *DeploymentApplication) error {
+func (deployer *ServiceDeployer) UnDeployTriggers(deployment *DeploymentProject) error {
for _, trigger := range deployment.Triggers {
if feedname, isFeed := utils.IsFeedAction(trigger); isFeed {
@@ -872,7 +895,7 @@
}
// Deploy Rules into OpenWhisk
-func (deployer *ServiceDeployer) UnDeployRules(deployment *DeploymentApplication) error {
+func (deployer *ServiceDeployer) UnDeployRules(deployment *DeploymentProject) error {
for _, rule := range deployment.Rules {
err := deployer.deleteRule(rule)
@@ -926,40 +949,40 @@
params = append(params, whisk.KeyValue{Key: "lifecycleEvent", Value: "DELETE"})
params = append(params, whisk.KeyValue{Key: "triggerName", Value: "/" + deployer.Client.Namespace + "/" + trigger.Name})
- parameters := make(map[string]interface{})
- for _, keyVal := range params {
- parameters[keyVal.Key] = keyVal.Value
- }
+ parameters := make(map[string]interface{})
+ for _, keyVal := range params {
+ parameters[keyVal.Key] = keyVal.Value
+ }
- qName, err := utils.ParseQualifiedName(feedName, deployer.ClientConfig.Namespace)
- if err != nil {
- return err
- }
+ qName, err := utils.ParseQualifiedName(feedName, deployer.ClientConfig.Namespace)
+ if err != nil {
+ return err
+ }
- namespace := deployer.Client.Namespace
- deployer.Client.Namespace = qName.Namespace
- _, _, err = deployer.Client.Actions.Invoke(qName.EntityName, parameters, true, true)
- deployer.Client.Namespace = namespace
+ namespace := deployer.Client.Namespace
+ deployer.Client.Namespace = qName.Namespace
+ _, _, err = deployer.Client.Actions.Invoke(qName.EntityName, parameters, true, true)
+ deployer.Client.Namespace = namespace
- if err != nil {
- wskErr := err.(*whisk.WskError)
- errString := wski18n.T("Failed to invoke the feed when deleting 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 utils.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode)
+ if err != nil {
+ wskErr := err.(*whisk.WskError)
+ errString := wski18n.T("Failed to invoke the feed when deleting 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 utils.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode)
- } else {
- trigger.Parameters = nil
+ } else {
+ trigger.Parameters = nil
- _, _, err := deployer.Client.Triggers.Delete(trigger.Name)
- 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 utils.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode)
- }
- }
+ _, _, err := deployer.Client.Triggers.Delete(trigger.Name)
+ 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 utils.NewWhiskClientError(wskErr.Error(), wskErr.ExitCode)
+ }
+ }
return nil
}
@@ -1037,7 +1060,7 @@
}
}
-func (deployer *ServiceDeployer) printDeploymentAssets(assets *DeploymentApplication) {
+func (deployer *ServiceDeployer) printDeploymentAssets(assets *DeploymentProject) {
// pretty ASCII OpenWhisk graphic
utils.PrintOpenWhiskOutputln(" ____ ___ _ _ _ _ _\n /\\ \\ / _ \\ _ __ ___ _ __ | | | | |__ (_)___| | __\n /\\ /__\\ \\ | | | | '_ \\ / _ \\ '_ \\| | | | '_ \\| / __| |/ /\n / \\____ \\ / | |_| | |_) | __/ | | | |/\\| | | | | \\__ \\ <\n \\ \\ / \\/ \\___/| .__/ \\___|_| |_|__/\\__|_| |_|_|___/_|\\_\\ \n \\___\\/ |_|\n")
@@ -1070,13 +1093,12 @@
utils.PrintOpenWhiskOutputln(" bindings: ")
for _, p := range action.Action.Parameters {
- if( reflect.TypeOf(p.Value).Kind() == reflect.Map ) {
- if _, ok := p.Value.(map[interface{}]interface{}); ok {
- var temp map[string]interface{} =
- utils.ConvertInterfaceMap(p.Value.(map[interface{}]interface{}))
+ if reflect.TypeOf(p.Value).Kind() == reflect.Map {
+ if _, ok := p.Value.(map[interface{}]interface{}); ok {
+ var temp map[string]interface{} = utils.ConvertInterfaceMap(p.Value.(map[interface{}]interface{}))
fmt.Printf(" - %s : %v\n", p.Key, temp)
} else {
- jsonValue,err := utils.PrettyJSON(p.Value)
+ jsonValue, err := utils.PrettyJSON(p.Value)
if err != nil {
fmt.Printf(" - %s : %s\n", p.Key, utils.UNKNOWN_VALUE)
} else {
diff --git a/deployers/verifier.go b/deployers/verifier.go
index cdc6f8a..116453f 100644
--- a/deployers/verifier.go
+++ b/deployers/verifier.go
@@ -23,7 +23,7 @@
"github.com/apache/incubator-openwhisk-client-go/whisk"
)
-// The verifier will filter the deployer against the target DeploymentApplication
+// The verifier will filter the deployer against the target DeploymentProject
// the deployer will query the OpenWhisk platform for already deployed entities.
// We assume the deployer and the manifest are targeted for the same namespace.
type Verifier struct {
@@ -31,16 +31,16 @@
type Filter interface {
// Perform some filter.
- Filter(deployer *ServiceDeployer, target *DeploymentApplication) (filtered *DeploymentApplication, err error)
+ Filter(deployer *ServiceDeployer, target *DeploymentProject) (filtered *DeploymentProject, err error)
// Perform some queries.
- Query(deployer *ServiceDeployer) (da *DeploymentApplication, err error)
+ Query(deployer *ServiceDeployer) (da *DeploymentProject, err error)
}
-func (vf *Verifier) Query(deployer *ServiceDeployer) (da *DeploymentApplication, err error) {
+func (vf *Verifier) Query(deployer *ServiceDeployer) (da *DeploymentProject, err error) {
pkgoptions := &whisk.PackageListOptions{false, 0, 0, 0, false}
packages, _, err := deployer.Client.Packages.List(pkgoptions)
- da = NewDeploymentApplication()
+ da = NewDeploymentProject()
for _, pa := range packages {
deppack := NewDeploymentPackage()
deppack.Package, _ = convert(&pa)
@@ -49,7 +49,7 @@
return da, nil
}
-func (vf *Verifier) Filter(deployer *ServiceDeployer, target *DeploymentApplication) (rs *DeploymentApplication, err error) {
+func (vf *Verifier) Filter(deployer *ServiceDeployer, target *DeploymentProject) (rs *DeploymentProject, err error) {
//substract
for _, pa := range target.Packages {
for _, dpa := range deployer.Deployment.Packages {
@@ -59,7 +59,7 @@
}
}
- depApp := NewDeploymentApplication()
+ depApp := NewDeploymentProject()
fmt.Printf("Target Packages are %#v\n", target.Packages)
depApp.Packages = target.Packages
return depApp, nil
diff --git a/deployers/whiskclient.go b/deployers/whiskclient.go
index 702f8b9..b0eac7c 100644
--- a/deployers/whiskclient.go
+++ b/deployers/whiskclient.go
@@ -98,9 +98,9 @@
if utils.FileExists(deploymentPath) {
mm := parsers.NewYAMLParser()
deployment, _ := mm.ParseDeployment(deploymentPath)
- credential = GetPropertyValue(credential, deployment.Application.Credential, path.Base(deploymentPath))
- namespace = GetPropertyValue(namespace, deployment.Application.Namespace, path.Base(deploymentPath))
- apiHost = GetPropertyValue(apiHost, deployment.Application.ApiHost, path.Base(deploymentPath))
+ credential = GetPropertyValue(credential, deployment.GetProject().Credential, path.Base(deploymentPath))
+ namespace = GetPropertyValue(namespace, deployment.GetProject().Namespace, path.Base(deploymentPath))
+ apiHost = GetPropertyValue(apiHost, deployment.GetProject().ApiHost, path.Base(deploymentPath))
}
}
diff --git a/docs/examples/deployment_hello_world_triggerrule_bindings.yaml b/docs/examples/deployment_hello_world_triggerrule_bindings.yaml
index b35b778..51a1018 100644
--- a/docs/examples/deployment_hello_world_triggerrule_bindings.yaml
+++ b/docs/examples/deployment_hello_world_triggerrule_bindings.yaml
@@ -1,4 +1,4 @@
-application:
+project:
packages:
hello_world_package:
triggers:
diff --git a/docs/examples/deployment_hello_world_triggerrule_unbound.yaml b/docs/examples/deployment_hello_world_triggerrule_unbound.yaml
index f325753..714f17d 100644
--- a/docs/examples/deployment_hello_world_triggerrule_unbound.yaml
+++ b/docs/examples/deployment_hello_world_triggerrule_unbound.yaml
@@ -1,4 +1,4 @@
-application:
+project:
package:
hello_world_package:
triggers:
diff --git a/parsers/deploy_parser.go b/parsers/deploy_parser.go
index ee9e041..31ad115 100644
--- a/parsers/deploy_parser.go
+++ b/parsers/deploy_parser.go
@@ -72,9 +72,9 @@
return
}
-//********************Application functions*************************//
+//********************Project functions*************************//
//This is for parse the deployment yaml file.
-func (app *Application) GetPackageList() []Package {
+func (app *Project) GetPackageList() []Package {
var s1 []Package = make([]Package, 0)
for _, pkg := range app.Packages {
pkg.Packagename = pkg.Packagename
diff --git a/parsers/deploy_parser_test.go b/parsers/deploy_parser_test.go
index 30992b9..7d0bfae 100644
--- a/parsers/deploy_parser_test.go
+++ b/parsers/deploy_parser_test.go
@@ -21,100 +21,100 @@
import (
"github.com/stretchr/testify/assert"
+ "io/ioutil"
"os"
"testing"
- "io/ioutil"
)
func createTmpfile(data string, filename string) (f *os.File, err error) {
- dir, _ := os.Getwd()
- tmpfile, err := ioutil.TempFile(dir, filename)
- if err != nil {
- return nil, err
- }
- _, err = tmpfile.Write([]byte(data))
- if err != nil {
- return tmpfile, err
- }
- return tmpfile, nil
+ dir, _ := os.Getwd()
+ tmpfile, err := ioutil.TempFile(dir, filename)
+ if err != nil {
+ return nil, err
+ }
+ _, err = tmpfile.Write([]byte(data))
+ if err != nil {
+ return tmpfile, err
+ }
+ return tmpfile, nil
}
func TestInvalidKeyDeploymentYaml(t *testing.T) {
- data :=`application:
+ data := `project:
name: wskdeploy-samples
invalidKey: test`
- tmpfile, err := createTmpfile(data, "deployment_parser_test_")
- if err != nil {
- assert.Fail(t, "Failed to create temp file")
- }
- defer func() {
- tmpfile.Close()
- os.Remove(tmpfile.Name())
- }()
- p := NewYAMLParser()
- _, err = p.ParseDeployment(tmpfile.Name())
- assert.NotNil(t, err)
- // go-yaml/yaml prints the wrong line number for mapping values. It should be 3.
- assert.Contains(t, err.Error(), "line 2: field invalidKey not found in struct parsers.Application")
+ tmpfile, err := createTmpfile(data, "deployment_parser_test_")
+ if err != nil {
+ assert.Fail(t, "Failed to create temp file")
+ }
+ defer func() {
+ tmpfile.Close()
+ os.Remove(tmpfile.Name())
+ }()
+ p := NewYAMLParser()
+ _, err = p.ParseDeployment(tmpfile.Name())
+ assert.NotNil(t, err)
+ // go-yaml/yaml prints the wrong line number for mapping values. It should be 3.
+ assert.Contains(t, err.Error(), "line 2: field invalidKey not found in struct parsers.Project")
}
func TestMappingValueDeploymentYaml(t *testing.T) {
- data :=`application:
+ data := `project:
name: wskdeploy-samples
packages: test`
- tmpfile, err := createTmpfile(data, "deployment_parser_test_")
- if err != nil {
- assert.Fail(t, "Failed to create temp file")
- }
- defer func() {
- tmpfile.Close()
- os.Remove(tmpfile.Name())
- }()
- p := NewYAMLParser()
- _, err = p.ParseDeployment(tmpfile.Name())
- assert.NotNil(t, err)
- // go-yaml/yaml prints the wrong line number for mapping values. It should be 3.
- assert.Contains(t, err.Error(), "line 2: mapping values are not allowed in this context")
+ tmpfile, err := createTmpfile(data, "deployment_parser_test_")
+ if err != nil {
+ assert.Fail(t, "Failed to create temp file")
+ }
+ defer func() {
+ tmpfile.Close()
+ os.Remove(tmpfile.Name())
+ }()
+ p := NewYAMLParser()
+ _, err = p.ParseDeployment(tmpfile.Name())
+ assert.NotNil(t, err)
+ // go-yaml/yaml prints the wrong line number for mapping values. It should be 3.
+ assert.Contains(t, err.Error(), "line 2: mapping values are not allowed in this context")
}
func TestMissingRootNodeDeploymentYaml(t *testing.T) {
- data :=`name: wskdeploy-samples`
- tmpfile, err := createTmpfile(data, "deployment_parser_test_")
- if err != nil {
- assert.Fail(t, "Failed to create temp file")
- }
- defer func() {
- tmpfile.Close()
- os.Remove(tmpfile.Name())
- }()
- p := NewYAMLParser()
- _, err = p.ParseDeployment(tmpfile.Name())
- assert.NotNil(t, err)
- // go-yaml/yaml prints the wrong line number for mapping values. It should be 3.
- assert.Contains(t, err.Error(), "line 1: field name not found in struct parsers.YAML")
+ data := `name: wskdeploy-samples`
+ tmpfile, err := createTmpfile(data, "deployment_parser_test_")
+ if err != nil {
+ assert.Fail(t, "Failed to create temp file")
+ }
+ defer func() {
+ tmpfile.Close()
+ os.Remove(tmpfile.Name())
+ }()
+ p := NewYAMLParser()
+ _, err = p.ParseDeployment(tmpfile.Name())
+ assert.NotNil(t, err)
+ // go-yaml/yaml prints the wrong line number for mapping values. It should be 3.
+ assert.Contains(t, err.Error(), "line 1: field name not found in struct parsers.YAML")
}
-func TestParseDeploymentYAML_Application(t *testing.T) {
+func TestParseDeploymentYAML_Project(t *testing.T) {
//var deployment utils.DeploymentYAML
mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_application.yaml")
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_project.yaml")
- //get and verify application name
- assert.Equal(t, "wskdeploy-samples", deployment.Application.Name, "Get application name failed.")
- assert.Equal(t, "/wskdeploy/samples/", deployment.Application.Namespace, "Get application namespace failed.")
- assert.Equal(t, "user-credential", deployment.Application.Credential, "Get application credential failed.")
- assert.Equal(t, "172.17.0.1", deployment.Application.ApiHost, "Get application api host failed.")
+ //get and verify project name
+ assert.Equal(t, "wskdeploy-samples", deployment.GetProject().Name, "Get project name failed.")
+ assert.Equal(t, "/wskdeploy/samples/", deployment.GetProject().Namespace, "Get project namespace failed.")
+ assert.Equal(t, "user-credential", deployment.GetProject().Credential, "Get project credential failed.")
+ assert.Equal(t, "172.17.0.1", deployment.GetProject().ApiHost, "Get project api host failed.")
}
-func TestParseDeploymentYAML_Application_Package(t *testing.T) {
+func TestParseDeploymentYAML_Project_Package(t *testing.T) {
//var deployment utils.DeploymentYAML
mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_application_package.yaml")
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_project_package.yaml")
- assert.Equal(t, 1, len(deployment.Application.Packages), "Get package list failed.")
- for pkg_name := range deployment.Application.Packages {
+ assert.Equal(t, 1, len(deployment.GetProject().Packages), "Get package list failed.")
+ for pkg_name := range deployment.GetProject().Packages {
assert.Equal(t, "test_package", pkg_name, "Get package name failed.")
- var pkg = deployment.Application.Packages[pkg_name]
+ var pkg = deployment.GetProject().Packages[pkg_name]
assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
@@ -127,53 +127,53 @@
}
func TestParseDeploymentYAML_Packages(t *testing.T) {
- //var deployment utils.DeploymentYAML
- mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_packages.yaml")
+ //var deployment utils.DeploymentYAML
+ mm := NewYAMLParser()
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_packages.yaml")
- assert.Equal(t, 0, len(deployment.Application.Packages), "Packages under application are empty.")
- assert.Equal(t, 0, len(deployment.Application.Package.Packagename), "Package name is empty.")
- assert.Equal(t, 1, len(deployment.Packages), "Packages are available.")
- for pkg_name := range deployment.Packages {
- assert.Equal(t, "test_package", pkg_name, "Get package name failed.")
- var pkg = deployment.Packages[pkg_name]
- assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
- assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
- assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
- //get and verify inputs
- for param_name, param := range pkg.Inputs {
- assert.Equal(t, "value", param.Value, "Get input value failed.")
- assert.Equal(t, "param", param_name, "Get input param name failed.")
- }
- }
+ assert.Equal(t, 0, len(deployment.GetProject().Packages), "Packages under project are empty.")
+ assert.Equal(t, 0, len(deployment.GetProject().Package.Packagename), "Package name is empty.")
+ assert.Equal(t, 1, len(deployment.Packages), "Packages are available.")
+ for pkg_name := range deployment.Packages {
+ assert.Equal(t, "test_package", pkg_name, "Get package name failed.")
+ var pkg = deployment.Packages[pkg_name]
+ assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
+ assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
+ assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
+ //get and verify inputs
+ for param_name, param := range pkg.Inputs {
+ assert.Equal(t, "value", param.Value, "Get input value failed.")
+ assert.Equal(t, "param", param_name, "Get input param name failed.")
+ }
+ }
}
func TestParseDeploymentYAML_Package(t *testing.T) {
- //var deployment utils.DeploymentYAML
- mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_package.yaml")
+ //var deployment utils.DeploymentYAML
+ mm := NewYAMLParser()
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_package.yaml")
- assert.Equal(t, 0, len(deployment.Application.Packages), "Get package list failed.")
- assert.Equal(t, 0, len(deployment.Application.Package.Packagename), "Package name is empty.")
- assert.Equal(t, 0, len(deployment.Packages), "Get package list failed.")
- assert.Equal(t, "test_package", deployment.Package.Packagename, "Get package name failed.")
- assert.Equal(t, "/wskdeploy/samples/test", deployment.Package.Namespace, "Get package namespace failed.")
- assert.Equal(t, "12345678ABCDEF", deployment.Package.Credential, "Get package credential failed.")
- assert.Equal(t, 1, len(deployment.Package.Inputs), "Get package input list failed.")
- //get and verify inputs
- for param_name, param := range deployment.Package.Inputs {
- assert.Equal(t, "value", param.Value, "Get input value failed.")
- assert.Equal(t, "param", param_name, "Get input param name failed.")
- }
+ assert.Equal(t, 0, len(deployment.GetProject().Packages), "Get package list failed.")
+ assert.Equal(t, 0, len(deployment.GetProject().Package.Packagename), "Package name is empty.")
+ assert.Equal(t, 0, len(deployment.Packages), "Get package list failed.")
+ assert.Equal(t, "test_package", deployment.Package.Packagename, "Get package name failed.")
+ assert.Equal(t, "/wskdeploy/samples/test", deployment.Package.Namespace, "Get package namespace failed.")
+ assert.Equal(t, "12345678ABCDEF", deployment.Package.Credential, "Get package credential failed.")
+ assert.Equal(t, 1, len(deployment.Package.Inputs), "Get package input list failed.")
+ //get and verify inputs
+ for param_name, param := range deployment.Package.Inputs {
+ assert.Equal(t, "value", param.Value, "Get input value failed.")
+ assert.Equal(t, "param", param_name, "Get input param name failed.")
+ }
}
func TestParseDeploymentYAML_Action(t *testing.T) {
mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_application_package.yaml")
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_project_package.yaml")
- for pkg_name := range deployment.Application.Packages {
+ for pkg_name := range deployment.GetProject().Packages {
- var pkg = deployment.Application.Packages[pkg_name]
+ var pkg = deployment.GetProject().Packages[pkg_name]
for action_name := range pkg.Actions {
assert.Equal(t, "hello", action_name, "Get action name failed.")
var action = pkg.Actions[action_name]
@@ -195,106 +195,108 @@
}
func TestParseDeploymentYAML_Packages_Env(t *testing.T) {
- testPackage := "test_package"
- os.Setenv("package_name", testPackage)
- assert.Equal(t, testPackage, os.Getenv("package_name"))
- //var deployment utils.DeploymentYAML
- mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_packages_env_var.yaml")
+ testPackage := "test_package"
+ os.Setenv("package_name", testPackage)
+ assert.Equal(t, testPackage, os.Getenv("package_name"))
+ //var deployment utils.DeploymentYAML
+ mm := NewYAMLParser()
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_packages_env_var.yaml")
- assert.Equal(t, 0, len(deployment.Application.Packages), "Packages under application are empty.")
- assert.Equal(t, 0, len(deployment.Application.Package.Packagename), "Package name is empty.")
- assert.Equal(t, 1, len(deployment.Packages), "Packages are available.")
- for pkg_name := range deployment.Packages {
- assert.Equal(t, testPackage, pkg_name, "Get package name failed.")
- var pkg = deployment.Packages[pkg_name]
- assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
- assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
- assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
- //get and verify inputs
- for param_name, param := range pkg.Inputs {
- assert.Equal(t, "value", param.Value, "Get input value failed.")
- assert.Equal(t, "param", param_name, "Get input param name failed.")
- }
- }
+ assert.Equal(t, 0, len(deployment.GetProject().Packages), "Packages under project are empty.")
+ assert.Equal(t, 0, len(deployment.GetProject().Package.Packagename), "Package name is empty.")
+ assert.Equal(t, 1, len(deployment.Packages), "Packages are available.")
+ for pkg_name := range deployment.Packages {
+ assert.Equal(t, testPackage, pkg_name, "Get package name failed.")
+ var pkg = deployment.Packages[pkg_name]
+ assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
+ assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
+ assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
+ //get and verify inputs
+ for param_name, param := range pkg.Inputs {
+ assert.Equal(t, "value", param.Value, "Get input value failed.")
+ assert.Equal(t, "param", param_name, "Get input param name failed.")
+ }
+ }
}
func TestParseDeploymentYAML_Package_Env(t *testing.T) {
- testPackage := "test_package"
- os.Setenv("package_name", testPackage)
- assert.Equal(t, testPackage, os.Getenv("package_name"))
- //var deployment utils.DeploymentYAML
- mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_package_env_var.yaml")
+ testPackage := "test_package"
+ os.Setenv("package_name", testPackage)
+ assert.Equal(t, testPackage, os.Getenv("package_name"))
+ //var deployment utils.DeploymentYAML
+ mm := NewYAMLParser()
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_package_env_var.yaml")
- assert.Equal(t, 0, len(deployment.Application.Packages), "Get package list failed.")
- assert.Equal(t, 0, len(deployment.Application.Package.Packagename), "Package name is empty.")
- assert.Equal(t, 0, len(deployment.Packages), "Get package list failed.")
- assert.Equal(t, testPackage, deployment.Package.Packagename, "Get package name failed.")
- assert.Equal(t, "/wskdeploy/samples/test", deployment.Package.Namespace, "Get package namespace failed.")
- assert.Equal(t, "12345678ABCDEF", deployment.Package.Credential, "Get package credential failed.")
- assert.Equal(t, 1, len(deployment.Package.Inputs), "Get package input list failed.")
- //get and verify inputs
- for param_name, param := range deployment.Package.Inputs {
- assert.Equal(t, "value", param.Value, "Get input value failed.")
- assert.Equal(t, "param", param_name, "Get input param name failed.")
- }
+ assert.Equal(t, 0, len(deployment.GetProject().Packages), "Get package list failed.")
+ assert.Equal(t, 0, len(deployment.GetProject().Package.Packagename), "Package name is empty.")
+ assert.Equal(t, 0, len(deployment.Packages), "Get package list failed.")
+ assert.Equal(t, testPackage, deployment.Package.Packagename, "Get package name failed.")
+ assert.Equal(t, "/wskdeploy/samples/test", deployment.Package.Namespace, "Get package namespace failed.")
+ assert.Equal(t, "12345678ABCDEF", deployment.Package.Credential, "Get package credential failed.")
+ assert.Equal(t, 1, len(deployment.Package.Inputs), "Get package input list failed.")
+ //get and verify inputs
+ for param_name, param := range deployment.Package.Inputs {
+ assert.Equal(t, "value", param.Value, "Get input value failed.")
+ assert.Equal(t, "param", param_name, "Get input param name failed.")
+ }
}
-func TestParseDeploymentYAML_Application_Package_Env(t *testing.T) {
- testPackage := "test_package"
- os.Setenv("package_name", testPackage)
- assert.Equal(t, testPackage, os.Getenv("package_name"))
- mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_application_package_env_var.yaml")
- assert.Equal(t, testPackage, deployment.Application.Package.Packagename, "Get package name failed.")
- assert.Equal(t, "/wskdeploy/samples/test", deployment.Application.Package.Namespace, "Get package namespace failed.")
- assert.Equal(t, "12345678ABCDEF", deployment.Application.Package.Credential, "Get package credential failed.")
- assert.Equal(t, 1, len(deployment.Application.Package.Inputs), "Get package input list failed.")
+func TestParseDeploymentYAML_Project_Package_Env(t *testing.T) {
+ testPackage := "test_package"
+ os.Setenv("package_name", testPackage)
+ assert.Equal(t, testPackage, os.Getenv("package_name"))
+ mm := NewYAMLParser()
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_project_package_env_var.yaml")
+ assert.Equal(t, testPackage, deployment.GetProject().Package.Packagename, "Get package name failed.")
+ assert.Equal(t, "/wskdeploy/samples/test", deployment.GetProject().Package.Namespace, "Get package namespace failed.")
+ assert.Equal(t, "12345678ABCDEF", deployment.GetProject().Package.Credential, "Get package credential failed.")
+ assert.Equal(t, 1, len(deployment.GetProject().Package.Inputs), "Get package input list failed.")
- // Verify the case of using concatenation.
- deployment, _ = mm.ParseDeployment("../tests/dat/deployment_data_application_package_env_var_con.yaml")
- assert.Equal(t, "test_package-test_package", deployment.Application.Package.Packagename, "Get package name failed.")
+ // Verify the case of using concatenation.
+ deployment, _ = mm.ParseDeployment("../tests/dat/deployment_data_project_package_env_var_con.yaml")
+ assert.Equal(t, "test_package-test_package", deployment.GetProject().Package.Packagename, "Get package name failed.")
}
-func TestParseDeploymentYAML_Application_Packages_Env(t *testing.T) {
- testPackage := "test_package"
- os.Setenv("package_name", testPackage)
- testPackageSec := "test_package_second"
- os.Setenv("package_name_second", testPackageSec)
- assert.Equal(t, testPackage, os.Getenv("package_name"))
- mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_application_packages_env_var.yaml")
+func TestParseDeploymentYAML_Project_Packages_Env(t *testing.T) {
+ testPackage := "test_package"
+ os.Setenv("package_name", testPackage)
+ testPackageSec := "test_package_second"
+ os.Setenv("package_name_second", testPackageSec)
+ assert.Equal(t, testPackage, os.Getenv("package_name"))
+ mm := NewYAMLParser()
+ deployment, _ := mm.ParseDeployment("../tests/dat/deployment_data_project_packages_env_var.yaml")
- expectedPackages := [2]string{testPackage, testPackageSec}
- assert.Equal(t, 2, len(deployment.Application.Packages), "Get package list failed.")
- for _, pkg_name := range expectedPackages {
- var pkg = deployment.Application.Packages[pkg_name]
- assert.Equal(t, pkg_name, pkg.Packagename, "Get package package name failed.")
- assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
- assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
- assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
- //get and verify inputs
- for param_name, param := range pkg.Inputs {
- assert.Equal(t, "value", param.Value, "Get input value failed.")
- assert.Equal(t, "param", param_name, "Get input param name failed.")
- }
- }
+ expectedPackages := [2]string{testPackage, testPackageSec}
+ dep := deployment.GetProject()
+ assert.Equal(t, 2, len(dep.Packages), "Get package list failed.")
+ for _, pkg_name := range expectedPackages {
+ var pkg = dep.Packages[pkg_name]
+ assert.Equal(t, pkg_name, pkg.Packagename, "Get package package name failed.")
+ assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
+ assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
+ assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
+ //get and verify inputs
+ for param_name, param := range pkg.Inputs {
+ assert.Equal(t, "value", param.Value, "Get input value failed.")
+ assert.Equal(t, "param", param_name, "Get input param name failed.")
+ }
+ }
- // Verify the case of using concatenation.
- expectedPackages = [2]string{testPackage + "suffix", testPackageSec + "suffix"}
- deployment, _ = mm.ParseDeployment("../tests/dat/deployment_data_application_packages_env_var_con.yaml")
- assert.Equal(t, 2, len(deployment.Application.Packages), "Get package list failed.")
- for _, pkg_name := range expectedPackages {
- var pkg = deployment.Application.Packages[pkg_name]
- assert.Equal(t, pkg_name, pkg.Packagename, "Get package package name failed.")
- assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
- assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
- assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
- //get and verify inputs
- for param_name, param := range pkg.Inputs {
- assert.Equal(t, "value", param.Value, "Get input value failed.")
- assert.Equal(t, "param", param_name, "Get input param name failed.")
- }
- }
+ // Verify the case of using concatenation.
+ expectedPackages = [2]string{testPackage + "suffix", testPackageSec + "suffix"}
+ deployment, _ = mm.ParseDeployment("../tests/dat/deployment_data_project_packages_env_var_con.yaml")
+ dep = deployment.GetProject()
+ assert.Equal(t, 2, len(dep.Packages), "Get package list failed.")
+ for _, pkg_name := range expectedPackages {
+ var pkg = dep.Packages[pkg_name]
+ assert.Equal(t, pkg_name, pkg.Packagename, "Get package package name failed.")
+ assert.Equal(t, "/wskdeploy/samples/test", pkg.Namespace, "Get package namespace failed.")
+ assert.Equal(t, "12345678ABCDEF", pkg.Credential, "Get package credential failed.")
+ assert.Equal(t, 1, len(pkg.Inputs), "Get package input list failed.")
+ //get and verify inputs
+ for param_name, param := range pkg.Inputs {
+ assert.Equal(t, "value", param.Value, "Get input value failed.")
+ assert.Equal(t, "param", param_name, "Get input param name failed.")
+ }
+ }
}
diff --git a/parsers/manifest_parser.go b/parsers/manifest_parser.go
index c38eaaa..5aa98e7 100644
--- a/parsers/manifest_parser.go
+++ b/parsers/manifest_parser.go
@@ -110,7 +110,7 @@
if manifest.Packages != nil {
packages = manifest.Packages
} else {
- packages = manifest.Application.Packages
+ packages = manifest.GetProject().Packages
}
}
@@ -207,7 +207,7 @@
if manifest.Packages != nil {
manifestPackages = manifest.Packages
} else {
- manifestPackages = manifest.Application.Packages
+ manifestPackages = manifest.GetProject().Packages
}
}
@@ -291,7 +291,7 @@
if mani.Packages != nil {
manifestPackages = mani.Packages
} else {
- manifestPackages = mani.Application.Packages
+ manifestPackages = mani.GetProject().Packages
}
}
@@ -359,7 +359,7 @@
if manifest.Packages != nil {
manifestPackages = manifest.Packages
} else {
- manifestPackages = manifest.Application.Packages
+ manifestPackages = manifest.GetProject().Packages
}
}
for n, p := range manifestPackages {
@@ -602,7 +602,7 @@
if manifest.Packages != nil {
manifestPackages = manifest.Packages
} else {
- manifestPackages = manifest.Application.Packages
+ manifestPackages = manifest.GetProject().Packages
}
}
for _, p := range manifestPackages {
@@ -683,7 +683,7 @@
if manifest.Packages != nil {
manifestPackages = manifest.Packages
} else {
- manifestPackages = manifest.Application.Packages
+ manifestPackages = manifest.GetProject().Packages
}
}
@@ -724,7 +724,7 @@
if manifest.Packages != nil {
manifestPackages = manifest.Packages
} else {
- manifestPackages = manifest.Application.Packages
+ manifestPackages = manifest.GetProject().Packages
}
}
diff --git a/parsers/yamlparser.go b/parsers/yamlparser.go
index 006e1cb..172fa2c 100644
--- a/parsers/yamlparser.go
+++ b/parsers/yamlparser.go
@@ -19,7 +19,7 @@
import (
"github.com/apache/incubator-openwhisk-client-go/whisk"
- "github.com/apache/incubator-openwhisk-wskdeploy/utils"
+ "github.com/apache/incubator-openwhisk-wskdeploy/utils"
)
// structs that denotes the sample manifest.yaml, wrapped yaml.v2
@@ -51,34 +51,33 @@
type Action struct {
//mapping to wsk.Action.Version
- Version string `yaml:"version"` //used in manifest.yaml
- Location string `yaml:"location"` //deprecated, used in manifest.yaml
- Function string `yaml:"function"` //used in manifest.yaml
- Runtime string `yaml:"runtime,omitempty"` //used in manifest.yaml
+ Version string `yaml:"version"` //used in manifest.yaml
+ Location string `yaml:"location"` //deprecated, used in manifest.yaml
+ Function string `yaml:"function"` //used in manifest.yaml
+ Runtime string `yaml:"runtime,omitempty"` //used in manifest.yaml
//mapping to wsk.Action.Namespace
- Namespace string `yaml:"namespace"` //used in deployment.yaml
- Credential string `yaml:"credential"` //used in deployment.yaml
- Inputs map[string]Parameter `yaml:"inputs"` //used in both manifest.yaml and deployment.yaml
- Outputs map[string]Parameter `yaml:"outputs"` //used in manifest.yaml
+ Namespace string `yaml:"namespace"` //used in deployment.yaml
+ Credential string `yaml:"credential"` //used in deployment.yaml
+ Inputs map[string]Parameter `yaml:"inputs"` //used in both manifest.yaml and deployment.yaml
+ Outputs map[string]Parameter `yaml:"outputs"` //used in manifest.yaml
//mapping to wsk.Action.Name
Name string
Annotations map[string]interface{} `yaml:"annotations,omitempty"`
//Parameters map[string]interface{} `yaml:parameters` // used in manifest.yaml
- ExposedUrl string `yaml:"exposedUrl"` // used in manifest.yaml
- Webexport string `yaml:"web-export"` // used in manifest.yaml
- Main string `yaml:"main"` // used in manifest.yaml
- Limits *Limits `yaml:"limits"` // used in manifest.yaml
+ ExposedUrl string `yaml:"exposedUrl"` // used in manifest.yaml
+ Webexport string `yaml:"web-export"` // used in manifest.yaml
+ Main string `yaml:"main"` // used in manifest.yaml
+ Limits *Limits `yaml:"limits"` // used in manifest.yaml
}
-
type Limits struct {
- Timeout *int `yaml:"timeout,omitempty"` //in ms, [100 ms,300000ms]
- Memory *int `yaml:"memorySize,omitempty"`//in MB, [128 MB,512 MB]
- Logsize *int `yaml:"logSize,omitempty"`//in MB, [0MB,10MB]
+ Timeout *int `yaml:"timeout,omitempty"` //in ms, [100 ms,300000ms]
+ Memory *int `yaml:"memorySize,omitempty"` //in MB, [128 MB,512 MB]
+ Logsize *int `yaml:"logSize,omitempty"` //in MB, [0MB,10MB]
ConcurrentActivations *int `yaml:"concurrentActivations,omitempty"` //not changeable via APIs
- UserInvocationRate *int `yaml:"userInvocationRate,omitempty"` //not changeable via APIs
- CodeSize *int `yaml:"codeSize,omitempty"` //not changeable via APIs
- ParameterSize *int `yaml:"parameterSize,omitempty"` //not changeable via APIs
+ UserInvocationRate *int `yaml:"userInvocationRate,omitempty"` //not changeable via APIs
+ CodeSize *int `yaml:"codeSize,omitempty"` //not changeable via APIs
+ ParameterSize *int `yaml:"parameterSize,omitempty"` //not changeable via APIs
}
type Sequence struct {
@@ -106,15 +105,15 @@
type Trigger struct {
//mapping to ????
- Feed string `yaml:"feed"` //used in manifest.yaml
+ Feed string `yaml:"feed"` //used in manifest.yaml
//mapping to wsk.Trigger.Namespace
Namespace string `yaml:"namespace"` //used in deployment.yaml
Credential string `yaml:"credential"` //used in deployment.yaml
Inputs map[string]Parameter `yaml:"inputs"` //used in deployment.yaml
//mapping to wsk.Trigger.Name
- Name string
+ Name string
Annotations map[string]interface{} `yaml:"annotations,omitempty"`
- Source string `yaml:source` // deprecated, used in manifest.yaml
+ Source string `yaml:source` // deprecated, used in manifest.yaml
//Parameters map[string]interface{} `yaml:parameters` // used in manifest.yaml
}
@@ -168,7 +167,7 @@
Apis map[string]map[string]map[string]map[string]string `yaml:"apis"` //used in manifest.yaml
}
-type Application struct {
+type Project struct {
Name string `yaml:"name"` //used in deployment.yaml
Namespace string `yaml:"namespace"` //used in deployment.yaml
Credential string `yaml:"credential"`
@@ -179,45 +178,60 @@
}
type YAML struct {
- Application Application `yaml:"application"` //used in deployment.yaml
- Packages map[string]Package `yaml:"packages"` //used in deployment.yaml
- Package Package `yaml:"package"`
- Filepath string //file path of the yaml file
+ Application Project `yaml:"application"` //used in deployment.yaml (being deprecated)
+ Project Project `yaml:"project"` //used in deployment.yaml
+ Packages map[string]Package `yaml:"packages"` //used in deployment.yaml
+ Package Package `yaml:"package"`
+ Filepath string //file path of the yaml file
+}
+
+// function to return Project or Application depending on what is specified in
+// manifest and deployment files
+func (yaml *YAML) GetProject() Project {
+ if yaml.Application.Name == "" {
+ return yaml.Project
+ }
+ return yaml.Application
}
func convertSinglePackageName(packageName string) string {
- if len(packageName) != 0 {
- packageNameEnv := utils.GetEnvVar(packageName)
- if str, ok := packageNameEnv.(string); ok {
- return str
- } else {
- return packageName
- }
- }
- return packageName
+ if len(packageName) != 0 {
+ packageNameEnv := utils.GetEnvVar(packageName)
+ if str, ok := packageNameEnv.(string); ok {
+ return str
+ } else {
+ return packageName
+ }
+ }
+ return packageName
}
func convertPackageName(packageMap map[string]Package) map[string]Package {
- packages := make(map[string]Package)
- for packName, depPacks := range packageMap {
- name := packName
- packageName := utils.GetEnvVar(packName)
- if str, ok := packageName.(string); ok {
- name = str
- }
- depPacks.Packagename = convertSinglePackageName(depPacks.Packagename)
- packages[name] = depPacks
- }
- return packages
+ packages := make(map[string]Package)
+ for packName, depPacks := range packageMap {
+ name := packName
+ packageName := utils.GetEnvVar(packName)
+ if str, ok := packageName.(string); ok {
+ name = str
+ }
+ depPacks.Packagename = convertSinglePackageName(depPacks.Packagename)
+ packages[name] = depPacks
+ }
+ return packages
}
func ReadEnvVariable(yaml *YAML) *YAML {
- yaml.Application.Package.Packagename = convertSinglePackageName(yaml.Application.Package.Packagename)
- yaml.Package.Packagename = convertSinglePackageName(yaml.Package.Packagename)
- yaml.Application.Packages = convertPackageName(yaml.Application.Packages)
- yaml.Packages = convertPackageName(yaml.Packages)
-
- return yaml
+ if yaml.Application.Name != "" {
+ yaml.Application.Package.Packagename = convertSinglePackageName(yaml.Application.Package.Packagename)
+ yaml.Package.Packagename = convertSinglePackageName(yaml.Package.Packagename)
+ yaml.Application.Packages = convertPackageName(yaml.Application.Packages)
+ } else {
+ yaml.Project.Package.Packagename = convertSinglePackageName(yaml.Project.Package.Packagename)
+ yaml.Package.Packagename = convertSinglePackageName(yaml.Package.Packagename)
+ yaml.Project.Packages = convertPackageName(yaml.Project.Packages)
+ }
+ yaml.Packages = convertPackageName(yaml.Packages)
+ return yaml
}
//********************Trigger functions*************************//
diff --git a/parsers/yamlparser_test.go b/parsers/yamlparser_test.go
index 3cc58c7..ad206f3 100644
--- a/parsers/yamlparser_test.go
+++ b/parsers/yamlparser_test.go
@@ -28,24 +28,24 @@
var manifestfile_val_tar = "../tests/dat/manifest_validate_trigger_action_rule_grammar.yaml"
var manifest_validate_triggerfeed = "../tests/dat/manifest_validate_triggerfeed.yaml"
var manifest_validate_rule = "../tests/dat/manifest_validate_rule.yaml"
-var deploymentfile_data_app = "../tests/dat/deployment_data_application.yaml"
-var deploymentfile_data_app_pkg = "../tests/dat/deployment_data_application_package.yaml"
+var deploymentfile_data_app = "../tests/dat/deployment_data_project.yaml"
+var deploymentfile_data_app_pkg = "../tests/dat/deployment_data_project_package.yaml"
var deployment_compose_trigger = "../tests/dat/deployment_compose_trigger.yaml"
-
func TestComposeWskPackage(t *testing.T) {
mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment(deploymentfile_data_app_pkg)
+ deployment, _ := mm.ParseDeployment(deploymentfile_data_app_pkg)
manifest, _ := mm.ParseManifest(manifestfile_val_pkg)
- pkglist := deployment.Application.GetPackageList()
+ dep := deployment.GetProject()
+ pkglist := dep.GetPackageList()
for _, pkg := range pkglist {
wskpkg := pkg.ComposeWskPackage()
assert.Equal(t, "test_package", wskpkg.Name, "Get package name failed.")
assert.Equal(t, "/wskdeploy/samples/test", wskpkg.Namespace, "Get package namespace failed.")
}
- for n, p := range manifest.Packages{
+ for n, p := range manifest.Packages {
wskpkg := p.ComposeWskPackage()
assert.Equal(t, "helloworld", n, "Get package name failed.")
assert.Equal(t, "1.0", wskpkg.Version, "Get package version failed.")
@@ -54,10 +54,11 @@
func TestComposeWskTrigger(t *testing.T) {
mm := NewYAMLParser()
- deployment, _ := mm.ParseDeployment(deployment_compose_trigger)
+ deployment, _ := mm.ParseDeployment(deployment_compose_trigger)
manifest, _ := mm.ParseManifest(manifest_validate_triggerfeed)
- pkg := deployment.Application.GetPackageList()[0]
+ dep := deployment.GetProject()
+ pkg := dep.GetPackageList()[0]
for _, trigger := range pkg.GetTriggerList() {
//temporarily add the nil to make test pass, as we plan refactor the parser as well as test codes.
wsktrigger := trigger.ComposeWskTrigger(nil)
@@ -100,7 +101,7 @@
manifest, _ := mm.ParseManifest(manifestfile_val_tar)
pkg := manifest.Packages["manifest2"]
actions := pkg.GetActionList()
- assert.Equal(t,3, len(actions), "Get action list failed.")
+ assert.Equal(t, 3, len(actions), "Get action list failed.")
}
func TestGetTriggerList(t *testing.T) {
@@ -108,7 +109,7 @@
manifest, _ := mm.ParseManifest(manifestfile_val_tar)
pkg := manifest.Packages["manifest2"]
triggers := pkg.GetTriggerList()
- assert.Equal(t,2, len(triggers), "Get trigger list failed.")
+ assert.Equal(t, 2, len(triggers), "Get trigger list failed.")
}
func TestGetRuleList(t *testing.T) {
@@ -116,7 +117,7 @@
manifest, _ := mm.ParseManifest(manifestfile_val_tar)
pkg := manifest.Packages["manifest2"]
rules := pkg.GetRuleList()
- assert.Equal(t,3, len(rules), "Get trigger list failed.")
+ assert.Equal(t, 3, len(rules), "Get trigger list failed.")
}
func TestGetFeedList(t *testing.T) {
@@ -124,7 +125,7 @@
manifest, _ := mm.ParseManifest(manifestfile_val_tar)
pkg := manifest.Packages["manifest2"]
feeds := pkg.GetFeedList()
- assert.Equal(t,4, len(feeds), "Get feed list failed.")
+ assert.Equal(t, 4, len(feeds), "Get feed list failed.")
}
func TestGetApisList(t *testing.T) {
@@ -132,5 +133,5 @@
manifest, _ := mm.ParseManifest(manifestfile_val_tar)
pkg := manifest.Packages["manifest2"]
apis := pkg.GetApis()
- assert.Equal(t,5, len(apis), "Get api list failed.")
+ assert.Equal(t, 5, len(apis), "Get api list failed.")
}
diff --git a/tests/dat/deployment_compose_trigger.yaml b/tests/dat/deployment_compose_trigger.yaml
index 300ef54..d3aea20 100644
--- a/tests/dat/deployment_compose_trigger.yaml
+++ b/tests/dat/deployment_compose_trigger.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: wskdeploy-samples
namespace: /wskdeploy/samples/
diff --git a/tests/dat/deployment_data_application.yaml b/tests/dat/deployment_data_project.yaml
similarity index 89%
rename from tests/dat/deployment_data_application.yaml
rename to tests/dat/deployment_data_project.yaml
index bee413e..9a80e49 100644
--- a/tests/dat/deployment_data_application.yaml
+++ b/tests/dat/deployment_data_project.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: wskdeploy-samples
namespace: /wskdeploy/samples/
credential: user-credential
diff --git a/tests/dat/deployment_data_application_package.yaml b/tests/dat/deployment_data_project_package.yaml
similarity index 94%
rename from tests/dat/deployment_data_application_package.yaml
rename to tests/dat/deployment_data_project_package.yaml
index e2904e4..2bd705e 100644
--- a/tests/dat/deployment_data_application_package.yaml
+++ b/tests/dat/deployment_data_project_package.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: wskdeploy-samples
namespace: /wskdeploy/samples/
diff --git a/tests/dat/deployment_data_application_package_env_var.yaml b/tests/dat/deployment_data_project_package_env_var.yaml
similarity index 93%
rename from tests/dat/deployment_data_application_package_env_var.yaml
rename to tests/dat/deployment_data_project_package_env_var.yaml
index eb987a5..97d9b56 100644
--- a/tests/dat/deployment_data_application_package_env_var.yaml
+++ b/tests/dat/deployment_data_project_package_env_var.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: wskdeploy-samples
namespace: /wskdeploy/samples/
diff --git a/tests/dat/deployment_data_application_package_env_var_con.yaml b/tests/dat/deployment_data_project_package_env_var_con.yaml
similarity index 94%
rename from tests/dat/deployment_data_application_package_env_var_con.yaml
rename to tests/dat/deployment_data_project_package_env_var_con.yaml
index 8372140..30b698a 100644
--- a/tests/dat/deployment_data_application_package_env_var_con.yaml
+++ b/tests/dat/deployment_data_project_package_env_var_con.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: wskdeploy-samples
namespace: /wskdeploy/samples/
diff --git a/tests/dat/deployment_data_application_packages_env_var.yaml b/tests/dat/deployment_data_project_packages_env_var.yaml
similarity index 96%
rename from tests/dat/deployment_data_application_packages_env_var.yaml
rename to tests/dat/deployment_data_project_packages_env_var.yaml
index 55546fc..a92ab2f 100644
--- a/tests/dat/deployment_data_application_packages_env_var.yaml
+++ b/tests/dat/deployment_data_project_packages_env_var.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: wskdeploy-samples
namespace: /wskdeploy/samples/
diff --git a/tests/dat/deployment_data_application_packages_env_var_con.yaml b/tests/dat/deployment_data_project_packages_env_var_con.yaml
similarity index 96%
rename from tests/dat/deployment_data_application_packages_env_var_con.yaml
rename to tests/dat/deployment_data_project_packages_env_var_con.yaml
index 9366928..92cce6e 100644
--- a/tests/dat/deployment_data_application_packages_env_var_con.yaml
+++ b/tests/dat/deployment_data_project_packages_env_var_con.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: wskdeploy-samples
namespace: /wskdeploy/samples/
diff --git a/tests/dat/deployment_validate_credentials.yaml b/tests/dat/deployment_validate_credentials.yaml
index 6026572..e44868d 100644
--- a/tests/dat/deployment_validate_credentials.yaml
+++ b/tests/dat/deployment_validate_credentials.yaml
@@ -1,6 +1,6 @@
# do not change or delete this file without changing deployers/whiskclient_test.go
# this is used for testing whiskclient functionality
-application:
+project:
name: UnitTestCredentials
apiHost: sample.deployment.openwhisk.org
credential: sample-deployment-credential
diff --git a/tests/dat/deployment_validate_deployment_reader.yaml b/tests/dat/deployment_validate_deployment_reader.yaml
index fd18d2b..2e20ea0 100644
--- a/tests/dat/deployment_validate_deployment_reader.yaml
+++ b/tests/dat/deployment_validate_deployment_reader.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: UnitTestDeployers
packages:
ValidateDeploymentReader:
diff --git a/tests/src/integration/alarmtrigger/deployment.yaml b/tests/src/integration/alarmtrigger/deployment.yaml
index 77b8ffc..4d983e3 100644
--- a/tests/src/integration/alarmtrigger/deployment.yaml
+++ b/tests/src/integration/alarmtrigger/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: HelloWorldEvery12Hours
packages:
helloworld:
diff --git a/tests/src/integration/common/wskdeploy.go b/tests/src/integration/common/wskdeploy.go
index 190353a..5245d3e 100644
--- a/tests/src/integration/common/wskdeploy.go
+++ b/tests/src/integration/common/wskdeploy.go
@@ -172,7 +172,7 @@
// This method will mock a construction of deployment plan, creating all the memory objects
// This method CANNOT be used for real deployment!
// Param manifestPath & deploymentPath MUST be the absolute path.
-func (wskdeploy *Wskdeploy) GetDeploymentObjects(manifestPath string, deploymentPath string) (*deployers.DeploymentApplication, error) {
+func (wskdeploy *Wskdeploy) GetDeploymentObjects(manifestPath string, deploymentPath string) (*deployers.DeploymentProject, error) {
//create ServiceDeployer and set default values
deployer := deployers.NewServiceDeployer()
deployer.ProjectPath = filepath.Dir(manifestPath)
diff --git a/tests/src/integration/helloworld/deployment.yaml b/tests/src/integration/helloworld/deployment.yaml
index 9d102c6..a228171 100644
--- a/tests/src/integration/helloworld/deployment.yaml
+++ b/tests/src/integration/helloworld/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTest
packages:
IntegrationTestHelloWorld:
diff --git a/tests/src/integration/message-hub/deployment.yaml b/tests/src/integration/message-hub/deployment.yaml
index 5f6413a..e300229 100644
--- a/tests/src/integration/message-hub/deployment.yaml
+++ b/tests/src/integration/message-hub/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: DataProcessingApp
packages:
data-processing-with-messagehub:
diff --git a/tests/src/integration/validate-application-and-project/actions/hello.js b/tests/src/integration/validate-application-and-project/actions/hello.js
new file mode 100644
index 0000000..25fdafb
--- /dev/null
+++ b/tests/src/integration/validate-application-and-project/actions/hello.js
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+/*
+ * Return a simple greeting message for the whole world.
+ */
+function main(params) {
+ msg = "Hello, " + params.name + " from " + params.place;
+ console.log(msg)
+ return { payload: msg };
+}
+
diff --git a/tests/src/integration/validate-application-and-project/deployment-with-application.yaml b/tests/src/integration/validate-application-and-project/deployment-with-application.yaml
new file mode 100644
index 0000000..1f600f9
--- /dev/null
+++ b/tests/src/integration/validate-application-and-project/deployment-with-application.yaml
@@ -0,0 +1,9 @@
+application:
+ name: IntegrationTest
+ packages:
+ packageValidatingApplication:
+ actions:
+ hello:
+ inputs:
+ name: Amy
+ place: Paris
diff --git a/tests/src/integration/validate-application-and-project/deployment-with-project.yaml b/tests/src/integration/validate-application-and-project/deployment-with-project.yaml
new file mode 100644
index 0000000..4c3c54f
--- /dev/null
+++ b/tests/src/integration/validate-application-and-project/deployment-with-project.yaml
@@ -0,0 +1,9 @@
+project:
+ name: IntegrationTest
+ packages:
+ packageValidatingProject:
+ actions:
+ hello:
+ inputs:
+ name: Amy
+ place: Paris
diff --git a/tests/src/integration/validate-application-and-project/manifest-with-application.yaml b/tests/src/integration/validate-application-and-project/manifest-with-application.yaml
new file mode 100644
index 0000000..1abc629
--- /dev/null
+++ b/tests/src/integration/validate-application-and-project/manifest-with-application.yaml
@@ -0,0 +1,18 @@
+packages:
+ packageValidatingApplication:
+ actions:
+ hello:
+ function: actions/hello.js
+ runtime: nodejs:6
+ inputs:
+ name:
+ type: string
+ description: name of a person
+ place:
+ type: string
+ description: location of a person
+ outputs:
+ payload:
+ type: string
+ description: a simple greeting message, Hello World!
+
diff --git a/tests/src/integration/validate-application-and-project/manifest-with-project.yaml b/tests/src/integration/validate-application-and-project/manifest-with-project.yaml
new file mode 100644
index 0000000..3e4c5b7
--- /dev/null
+++ b/tests/src/integration/validate-application-and-project/manifest-with-project.yaml
@@ -0,0 +1,18 @@
+packages:
+ packageValidatingProject:
+ actions:
+ hello:
+ function: actions/hello.js
+ runtime: nodejs:6
+ inputs:
+ name:
+ type: string
+ description: name of a person
+ place:
+ type: string
+ description: location of a person
+ outputs:
+ payload:
+ type: string
+ description: a simple greeting message, Hello World!
+
diff --git a/tests/src/integration/validate-application-and-project/validate-application-and-project_test.go b/tests/src/integration/validate-application-and-project/validate-application-and-project_test.go
new file mode 100644
index 0000000..a110ef2
--- /dev/null
+++ b/tests/src/integration/validate-application-and-project/validate-application-and-project_test.go
@@ -0,0 +1,50 @@
+// +build integration
+
+/*
+ * 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 tests
+
+import (
+ "github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/common"
+ "github.com/stretchr/testify/assert"
+ "os"
+ "testing"
+)
+
+var path = "/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/validate-application-and-project/"
+
+func TestApplicationInDeployment(t *testing.T) {
+ manifestPath := os.Getenv("GOPATH") + path + "manifest-with-application.yaml"
+ deploymentPath := os.Getenv("GOPATH") + path + "deployment-with-application.yaml"
+ wskdeploy := common.NewWskdeploy()
+ _, err := wskdeploy.Deploy(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+ _, err = wskdeploy.Undeploy(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to undeploy based on the manifest and deployment files.")
+}
+
+func TestProjectInDeployment(t *testing.T) {
+ manifestPath := os.Getenv("GOPATH") + path + "manifest-with-project.yaml"
+ deploymentPath := os.Getenv("GOPATH") + path + "deployment-with-project.yaml"
+ wskdeploy := common.NewWskdeploy()
+ _, err := wskdeploy.Deploy(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+ _, err = wskdeploy.Undeploy(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to undeploy based on the manifest and deployment files.")
+}
+
diff --git a/tests/src/integration/validate-binding-inputs-annotations/deployment.yaml b/tests/src/integration/validate-binding-inputs-annotations/deployment.yaml
index 81d1988..ec0526d 100644
--- a/tests/src/integration/validate-binding-inputs-annotations/deployment.yaml
+++ b/tests/src/integration/validate-binding-inputs-annotations/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: BindingTest
packages:
packagebinding:
diff --git a/tests/src/integration/validate-manifest-deployment-file-extensions/deployment.yaml b/tests/src/integration/validate-manifest-deployment-file-extensions/deployment.yaml
index 65252dc..1c2770a 100644
--- a/tests/src/integration/validate-manifest-deployment-file-extensions/deployment.yaml
+++ b/tests/src/integration/validate-manifest-deployment-file-extensions/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTest
packages:
ValidateYAMLExtension:
diff --git a/tests/src/integration/validate-manifest-deployment-file-extensions/not-standard-deployment.yaml b/tests/src/integration/validate-manifest-deployment-file-extensions/not-standard-deployment.yaml
index df79358..2df5d88 100644
--- a/tests/src/integration/validate-manifest-deployment-file-extensions/not-standard-deployment.yaml
+++ b/tests/src/integration/validate-manifest-deployment-file-extensions/not-standard-deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTest
packages:
ValidateNotStandardFileNames:
diff --git a/tests/src/integration/validate-manifest-deployment-file-extensions/random-name-2.yaml b/tests/src/integration/validate-manifest-deployment-file-extensions/random-name-2.yaml
index 1dc4f2d..f6f9307 100644
--- a/tests/src/integration/validate-manifest-deployment-file-extensions/random-name-2.yaml
+++ b/tests/src/integration/validate-manifest-deployment-file-extensions/random-name-2.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTest
packages:
ValidateRandomFileNames:
diff --git a/tests/src/integration/validate-manifest-deployment-file-extensions/yaml-deployment-with-yml-manifest.yaml b/tests/src/integration/validate-manifest-deployment-file-extensions/yaml-deployment-with-yml-manifest.yaml
index 82d6086..6176747 100644
--- a/tests/src/integration/validate-manifest-deployment-file-extensions/yaml-deployment-with-yml-manifest.yaml
+++ b/tests/src/integration/validate-manifest-deployment-file-extensions/yaml-deployment-with-yml-manifest.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTest
packages:
ValidateYMLManifestWithYAMLDeployment:
diff --git a/tests/src/integration/validate-package-in-manifest/deployment.yaml b/tests/src/integration/validate-package-in-manifest/deployment.yaml
index 7200329..024ee7b 100644
--- a/tests/src/integration/validate-package-in-manifest/deployment.yaml
+++ b/tests/src/integration/validate-package-in-manifest/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTest
packages:
usingPackageInManifest:
diff --git a/tests/src/integration/validate-packages-in-manifest/deployment.yaml b/tests/src/integration/validate-packages-in-manifest/deployment.yaml
index 5ee0f75..ef0cb5e 100644
--- a/tests/src/integration/validate-packages-in-manifest/deployment.yaml
+++ b/tests/src/integration/validate-packages-in-manifest/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTest
packages:
packageNodeJS:
diff --git a/tests/src/integration/validatePackageInDeployment/deployment.yaml b/tests/src/integration/validatePackageInDeployment/deployment.yaml
index 7242d68..c4174d4 100644
--- a/tests/src/integration/validatePackageInDeployment/deployment.yaml
+++ b/tests/src/integration/validatePackageInDeployment/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTestPackageInDeployment
package:
name: TestPackageInDeploymentFile
diff --git a/tests/src/integration/validatePackagesInDeployment/deployment.yaml b/tests/src/integration/validatePackagesInDeployment/deployment.yaml
index 541e0cb..4f3aec9 100644
--- a/tests/src/integration/validatePackagesInDeployment/deployment.yaml
+++ b/tests/src/integration/validatePackagesInDeployment/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: IntegrationTestPackagesInDeployment
packages:
TestPackagesInDeploymentFile:
diff --git a/tests/usecases/github/deployment.yaml b/tests/usecases/github/deployment.yaml
index a4f88e5..76b80cc 100644
--- a/tests/usecases/github/deployment.yaml
+++ b/tests/usecases/github/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: AppToPrintGitHubCommits
packages:
GitHubCommits:
diff --git a/tests/usecases/slack/deployment.yaml b/tests/usecases/slack/deployment.yaml
index d8fb8cd..c9a4832 100644
--- a/tests/usecases/slack/deployment.yaml
+++ b/tests/usecases/slack/deployment.yaml
@@ -1,4 +1,4 @@
-application:
+project:
name: AppToPostToSlack
packages:
SlackPackage:
diff --git a/utils/misc.go b/utils/misc.go
index 5775872..b37b059 100644
--- a/utils/misc.go
+++ b/utils/misc.go
@@ -78,7 +78,7 @@
return usr.HomeDir
}
-// Potentially complex structures(such as DeploymentApplication, DeploymentPackage)
+// Potentially complex structures(such as DeploymentProject, DeploymentPackage)
// could implement those interface which is convenient for put, get subtract in
// containers etc.
type Comparable interface {
diff --git a/wski18n/i18n_resources.go b/wski18n/i18n_resources.go
index d3c127f..76bb34e 100644
--- a/wski18n/i18n_resources.go
+++ b/wski18n/i18n_resources.go
@@ -32,330 +32,330 @@
package wski18n
import (
- "bytes"
- "compress/gzip"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
- "time"
+ "bytes"
+ "compress/gzip"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "strings"
+ "time"
)
func bindataRead(data []byte, name string) ([]byte, error) {
- gz, err := gzip.NewReader(bytes.NewBuffer(data))
- if err != nil {
- return nil, fmt.Errorf("Read %q: %v", name, err)
- }
+ gz, err := gzip.NewReader(bytes.NewBuffer(data))
+ if err != nil {
+ return nil, fmt.Errorf("Read %q: %v", name, err)
+ }
- var buf bytes.Buffer
- _, err = io.Copy(&buf, gz)
- clErr := gz.Close()
+ var buf bytes.Buffer
+ _, err = io.Copy(&buf, gz)
+ clErr := gz.Close()
- if err != nil {
- return nil, fmt.Errorf("Read %q: %v", name, err)
- }
- if clErr != nil {
- return nil, err
- }
+ if err != nil {
+ return nil, fmt.Errorf("Read %q: %v", name, err)
+ }
+ if clErr != nil {
+ return nil, err
+ }
- return buf.Bytes(), nil
+ return buf.Bytes(), nil
}
type asset struct {
- bytes []byte
- info os.FileInfo
+ bytes []byte
+ info os.FileInfo
}
type bindataFileInfo struct {
- name string
- size int64
- mode os.FileMode
- modTime time.Time
+ name string
+ size int64
+ mode os.FileMode
+ modTime time.Time
}
func (fi bindataFileInfo) Name() string {
- return fi.name
+ return fi.name
}
func (fi bindataFileInfo) Size() int64 {
- return fi.size
+ return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
- return fi.mode
+ return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
- return fi.modTime
+ return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
- return false
+ return false
}
func (fi bindataFileInfo) Sys() interface{} {
- return nil
+ return nil
}
var _wski18nResourcesDe_deAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesDe_deAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesDe_deAllJson,
- "wski18n/resources/de_DE.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesDe_deAllJson,
+ "wski18n/resources/de_DE.all.json",
+ )
}
func wski18nResourcesDe_deAllJson() (*asset, error) {
- bytes, err := wski18nResourcesDe_deAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesDe_deAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/de_DE.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/de_DE.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
-var _wski18nResourcesEn_usAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x5d\x6f\xdb\x3a\x12\x7d\xcf\xaf\x18\xe4\xc5\x2f\x81\xb6\xbd\x8b\x05\x16\x7d\x0b\x6e\xbf\x82\xb6\x69\x90\x64\x5b\x14\xdd\x02\x61\xc4\xb1\xc5\x9a\x22\x05\x92\x72\xe0\x1a\xfe\xef\x0b\x8a\x92\xed\x24\x14\x45\xc9\xb2\xb7\xbb\xb8\x7d\x72\x6c\xce\x39\x67\x86\xe4\x70\x46\x62\xbf\x9f\x00\xac\x4e\x00\x00\x4e\x19\x3d\x7d\x05\xa7\xef\x91\x73\x79\x7a\xe6\xbe\x32\x8a\x08\xcd\x89\x61\x52\xd8\xdf\xce\x05\x9c\x5f\x5d\x40\x26\xb5\x81\xbc\xd4\x06\xee\x11\x0a\x25\x17\x8c\x22\x4d\x4e\x4f\x00\xd6\x67\x4f\xe1\x3e\x31\xad\x99\x98\x41\x9a\x53\x98\xe3\xb2\x05\xb8\x19\x35\x49\x73\x3a\x01\x26\x8a\xd2\x54\xa3\xbd\x90\x79\x3d\x38\x27\x82\x4d\x51\x9b\x64\x49\x72\x0e\x53\xc6\xb1\x03\xdd\x63\xe0\x25\x20\xa5\xc9\xa4\x62\xbf\x2a\x00\xb8\xfb\xf0\xe6\xdb\x5d\x0b\xb2\x6f\xa4\x17\xf2\x21\x63\x7a\x5e\x05\xef\xee\xfd\xe7\x9b\xdb\x36\xbc\x67\xc3\xbc\x60\x82\xe4\xa8\x0b\x92\xb6\xf9\xbb\xfd\xbd\x4b\xcb\x97\x37\xd7\x37\x17\x9f\x2f\x23\xe4\x6c\x46\xfa\x67\xb9\x8e\x6c\x15\x54\x10\xd2\xc0\x54\x96\x82\x02\x31\x50\x10\x93\xc1\x6a\x95\x14\x4a\xfe\xc4\xd4\x5c\x11\x93\xad\xd7\xc9\xbf\x45\xdb\x5c\x0d\x40\x0a\x2e\xbc\xd5\xaa\x9a\xee\xf5\xfa\x6f\xf6\x93\xfd\x50\x41\x27\x30\xa2\xe6\x43\x50\x45\xc4\x99\xe9\xc7\x58\x26\x43\x87\xf7\x7d\xb5\x4a\xec\x08\x87\xf6\x23\x36\xda\x7d\xf0\xbc\xf2\xfe\xd5\x84\xa1\xd9\x69\xce\x00\xa6\x52\x01\xc5\x82\xcb\x65\x8e\xc2\xb4\xcb\x89\xb7\xef\x4d\x5f\x8a\x7d\x05\x3c\x45\xf0\x4a\xb0\x21\x53\xa5\x30\x2c\xdf\x84\x53\x97\x45\x21\x95\x41\x0a\xf7\x4b\xf8\x5c\xa0\x70\xbb\xaa\xe0\xc4\x4c\xa5\xca\xdb\xc5\x0c\xc3\xf2\x6f\x79\x3d\x77\xe2\x21\x23\x1a\xd2\x4c\x6a\x14\x40\xa0\x20\xca\xb0\xb4\xe4\x44\x6d\x88\xac\xa7\x96\x98\xa4\x56\x46\xbb\xb8\x7d\x10\xfd\x93\x27\xb6\xce\x35\xa6\x66\x59\xe0\x19\x68\x34\x60\x24\x08\x49\xf1\xa7\x6e\x9b\xb8\x48\x6b\x2f\xf5\xad\x55\x57\x9a\x0c\x85\x61\xa9\x4b\xe5\x73\x5c\x36\x31\x4f\xa5\x98\xb2\x59\xa9\x90\xb6\x47\xa3\x0f\x42\xab\x84\xcd\xd1\xda\x93\x38\x6c\xd7\x4a\xb7\x39\x25\xfa\xf2\x75\x18\x46\xf9\xb7\x5a\x25\xa4\x60\xf6\xaf\xf5\xfa\x0c\xa6\x4a\xe6\xf5\x57\x5a\x96\x2a\xc5\x50\xb6\x1d\x04\x15\x9c\xf7\x66\xae\x34\x9a\x1d\x80\xd2\x64\x71\x62\xa2\x21\xe2\xa6\x62\xb5\x4a\x36\x7f\xef\x7a\xb4\xf9\x32\x4e\xd5\x70\x4c\xaf\xcc\xb7\x84\x71\xa4\x76\x27\xcd\xd0\x9d\x0c\xcf\x36\x9c\x76\xb0\x36\x2d\x7d\xad\xd2\x92\x46\xb5\x60\x29\xbe\xb2\x4c\xa8\x54\x48\xf1\x68\xf0\x5e\xf1\x37\x86\xa8\x2a\x0b\x94\x22\x27\x4a\x67\x84\xef\x24\x4f\x26\xa6\xd2\x41\x73\x99\x12\x0e\x0b\xc2\x4b\xd4\xed\x52\x07\x82\xb5\x24\xbd\x10\x04\x13\x06\x95\xc0\xd0\x79\x15\x6d\xef\xa5\x7f\xbd\x39\xd0\x20\x95\x79\xc1\xd1\x86\x5b\x97\x69\x8a\x5a\x4f\x4b\xce\x97\xed\xcc\x51\xa6\x5e\xd2\x77\xd2\x00\x2a\x25\x15\xa4\x0a\x89\xb1\x07\x6e\x41\xd2\x39\x99\x21\x3c\x30\x93\xd5\xbf\xe5\xa8\x35\x99\xed\x4c\x2e\x10\x41\x1b\x3b\x49\xdd\x0f\xf6\x43\x68\x55\x1d\x84\x2a\xd6\x29\x77\xde\xfd\x0f\xfb\xb4\xdd\x69\x7f\x72\x66\x27\xfa\x8d\x35\x6f\x91\xd5\x32\xd8\x0b\x7c\x21\x16\x84\x33\x5a\xf7\x79\x72\x0a\xdf\x3a\x1a\xb8\x80\x41\xf4\x6c\x14\xec\x18\x53\xb1\x1f\x4d\xac\x33\xaa\xe4\x47\xd9\x2c\x7b\xf2\x74\xb8\xa3\xd1\x54\x2c\x55\xb6\x37\xc4\x94\xda\x4e\xed\x81\x7d\x3b\x08\x69\xec\xbc\x19\xc5\x66\x33\x54\xc7\x98\xba\xfd\xa9\xfa\x3a\x35\x45\xa4\xc7\xf4\x6c\x4f\xbe\xbe\x67\xd3\x3d\x13\xd4\xfe\x7d\xc4\x7c\xbe\x3f\x65\xd7\xa9\x2f\xa7\xb6\xaf\x46\x41\x51\xa4\x4b\x6b\x4a\xb1\xb8\x24\x39\xae\xd7\x40\x19\xad\x8b\x7b\x77\xba\xdb\xc3\x7d\x73\xb6\xc3\x75\x29\xe0\x6e\xdb\x03\x36\xbd\xf1\x9d\xad\x8b\x14\xe6\x72\x81\xae\x15\x24\x9c\x2f\xeb\xd6\x1d\x29\x10\xad\xd1\x04\x4a\xab\xdf\x41\x59\x20\x64\x3b\xa7\xfa\x6a\x95\xc8\xd2\x14\xa5\x59\xaf\x21\x49\x92\xa0\x3f\x01\xb3\x0e\xb2\x2a\x2d\xf5\xa5\xf2\x1a\x75\x10\x3d\xda\x53\x7d\x09\x83\xc6\x1d\xc4\xcd\x52\xef\xcb\xd9\x66\x17\x49\xd7\xec\xac\xa1\xb4\x6d\xf6\x1d\xf4\x8f\x57\x74\x2f\xe6\x80\xa9\xbf\x78\xfb\x90\xc0\x9f\x44\xa4\xc8\x79\x6d\xde\xf9\xf0\x2b\x68\xd2\x41\x62\x0d\xe2\x1e\xb1\x85\x6d\x5a\xba\xa4\xed\xa0\xf0\xee\x0f\x34\x4a\x3d\x20\xba\xb2\xa6\x4b\x23\x03\x3a\xa5\x36\xc3\xdf\xd7\xeb\x06\xe1\xf9\x12\xdc\xe6\xe3\xf6\xe5\x1b\x6b\xdd\xed\xff\xd0\xe3\x20\x2e\x34\x7b\xa0\x77\x94\x11\x14\x39\x1e\xa7\x1b\x1c\x8f\x29\xd6\xa5\x03\x57\xea\x63\xf1\xfc\xd5\x85\x3c\x89\xe7\xe1\xbb\x90\x11\xa9\xfa\x3a\x75\xe0\x2e\x64\x6c\xbe\x58\xf7\x0e\xff\x84\x6c\x44\x2a\xaf\x53\x5f\xcf\xaf\x2f\x2f\x2e\xdf\xbd\x82\xdb\x0c\x61\xe2\x9e\x37\x4f\xe0\xdb\xf9\xa7\x8f\xee\xd9\xb9\xd8\x84\x14\x85\x61\xa6\x7a\x9a\x4e\xb1\x50\x98\x12\x83\x34\x81\x2b\x8e\x44\x23\x94\x1a\x61\x62\x83\x3e\x01\x26\xb4\x41\x62\x6b\x77\xa0\xa8\x53\xc5\xee\x91\x5a\x1c\x5d\x60\xca\xa6\xf5\x7b\x98\x40\xb7\xf1\xdf\x54\x14\x3b\xef\x4d\xa1\x79\xc4\xf9\x1f\x8f\xb2\xad\x8e\xf2\x15\xb2\x19\xd1\x70\x8f\x28\x1e\xd5\x46\x9b\xfe\x2c\x58\x5d\x0d\x83\xf3\x8a\xbb\x0a\xd4\xf7\x43\x15\xee\x87\x19\x94\x39\xa6\xbc\x11\x64\xdd\xd6\xdb\x65\x0c\x59\xc3\xb0\x82\xb2\x9e\xf5\xa7\xfb\x6a\x1b\x00\xe8\x15\x78\xfd\xb4\x63\x1f\x2a\x6c\x00\x90\x57\xd0\xf9\xf3\xa7\x15\x43\x25\x0d\x82\x8a\x48\x1c\xdb\x0a\xdd\x0f\xd7\x34\x96\xf1\xb9\xa3\x1f\x62\xd7\x06\xa8\x8f\x8e\x5d\xb4\xba\xfb\x8b\x5a\xf3\x61\xf3\xe0\x2a\xb2\x55\x64\x2f\xda\x08\xc3\x8e\x55\xe2\x5a\x8e\x5e\xa4\x91\xc6\x1d\xef\xa2\x99\x58\xc8\x39\x56\x65\xb4\x2b\xc4\x32\x14\x47\xaa\x09\x8f\x2c\x22\x5c\x53\x7d\x22\x82\x12\x23\xd5\x12\xa6\x0c\x39\x85\x26\xa9\x7f\x41\xa5\x6d\x98\x9b\xcb\x9a\x3a\xf4\x32\x79\x28\x5a\x58\xda\x53\xe3\xe6\x26\x13\x59\xb8\xda\xc8\x86\x2d\x2d\x95\xb2\x7d\xf8\xf6\xb1\xed\xc2\x8d\x8e\x10\xbb\x37\xfe\xb0\xc8\x7e\x64\x29\x0a\x8d\x23\x45\xb6\x05\x2d\x2e\xb2\x8d\xf1\xa1\x22\x3b\x18\x3f\x2c\xbf\x81\x5d\xad\x12\xee\x3e\x5e\xbc\x5e\xaf\x1b\x16\x02\xee\x95\xaf\x14\x18\x21\xb5\x17\x96\xff\x52\x31\xe6\x52\x2d\x6f\xd8\x2f\xb4\x9d\x38\x67\x39\x33\xda\x3a\xd9\x5c\x04\x04\x9d\xc9\x92\x53\x3b\x39\x44\x54\x37\x2b\xec\xa6\xbe\x47\xf3\x60\x33\xd6\xcb\x3f\xfe\x59\x6d\xdf\x7f\xbc\xfc\xa3\x5d\xed\xa8\x14\xfe\xdb\x87\x2c\x47\xe9\xde\x90\xf7\x86\x7f\xf1\xa2\x82\xff\xfb\x0b\xfb\x2f\x70\x29\x71\x4c\x0a\xaf\x13\x5c\xce\x86\xc6\xc8\xe1\xbf\x0c\xc8\x1f\x09\x3c\xbc\xb2\x9b\xeb\x0a\x15\x83\xbb\x0d\x38\xa9\xe3\x36\xb1\xcc\xf5\x13\xba\x5d\x66\xa6\x81\xcd\x84\x54\x3b\x7d\x65\x9a\x61\x3a\x77\x07\x42\x4c\x13\x7b\x18\xd2\xfe\x8e\x6e\x57\xf9\x71\x7d\x1d\x85\xb7\xbf\xbb\xf5\x82\x3a\xae\xaf\xfb\x93\x76\xa5\xe6\x6a\x6b\xb8\x74\x9a\x33\x23\x5c\x5d\xbc\xb9\xef\x99\x11\x31\x23\xf7\x1c\x81\x68\x77\xb7\xf6\xe1\x0c\x1e\x32\x96\x66\xf0\xc0\x38\xb7\xfb\xa7\xe1\x8f\x49\xdd\x23\x72\x79\xdd\xaa\xae\xb0\xcb\x69\x75\x5e\x25\x73\x5c\x86\x6e\x1a\xf9\xc7\x76\xc3\xa6\xa8\x4c\x34\xee\x76\x70\xf0\x46\x68\x33\x9e\x14\x05\x6f\x6e\x15\x57\x37\x5b\xab\x3e\xc5\xbd\x56\xb2\x87\x9c\xd8\x79\x55\xe7\x2e\xf2\x13\x53\x5d\xd9\xdf\x7e\xfd\x96\xd9\xd2\xfe\x07\x50\x89\x2e\xac\x39\x31\x69\x56\xa1\x77\x33\x35\xff\x49\x60\xed\xc8\xf2\x47\xff\x67\xa0\xa6\x6a\xbe\xac\x89\xda\x5e\x08\xfd\x5f\xb8\x66\x27\xed\xe4\xe4\xc7\xc9\x7f\x02\x00\x00\xff\xff\x9b\xad\x0e\xe5\x3b\x35\x00\x00")
+var _wski18nResourcesEn_usAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x5d\x6f\xdb\x3a\x12\x7d\xcf\xaf\x18\xe4\xc5\x2f\x81\xb6\xbd\x8b\x05\x16\x7d\x0b\x6e\xbf\x82\xb6\x69\x90\x64\x5b\x14\xdd\x02\x61\xc4\xb1\xc5\x9a\x22\x05\x92\x72\xe0\x1a\xfe\xef\x0b\x8a\x92\xed\x24\x14\x45\xc9\xb2\xb7\xbb\xb8\x79\x72\x64\xce\x39\x67\x86\x5f\x33\x14\xfd\xfd\x04\x60\x75\x02\x00\x70\xca\xe8\xe9\x2b\x38\x7d\x8f\x9c\xcb\xd3\x33\xf7\xc8\x28\x22\x34\x27\x86\x49\x61\xbf\x3b\x17\x70\x7e\x75\x01\x99\xd4\x06\xf2\x52\x1b\xb8\x47\x28\x94\x5c\x30\x8a\x34\x39\x3d\x01\x58\x9f\x3d\x85\xfb\xc4\xb4\x66\x62\x06\x69\x4e\x61\x8e\xcb\x16\xe0\xa6\xd5\x24\xcd\xe9\x04\x98\x28\x4a\x53\xb5\xf6\x42\xe6\x75\xe3\x9c\x08\x36\x45\x6d\x92\x25\xc9\x39\x4c\x19\xc7\x0e\x74\x8f\x81\x97\x80\x94\x26\x93\x8a\xfd\xaa\x00\xe0\xee\xc3\x9b\x6f\x77\x2d\xc8\xbe\x96\x5e\xc8\x87\x8c\xe9\x79\x15\xbc\xbb\xf7\x9f\x6f\x6e\xdb\xf0\x9e\x35\xf3\x82\x09\x92\xa3\x2e\x48\xda\xe6\xef\xf6\xfb\x2e\x2d\x5f\xde\x5c\xdf\x5c\x7c\xbe\x8c\x90\xb3\x69\xe9\xef\xe5\x3a\xb2\x55\x50\x41\x48\x03\x53\x59\x0a\x0a\xc4\x40\x41\x4c\x06\xab\x55\x52\x28\xf9\x13\x53\x73\x45\x4c\xb6\x5e\x27\xff\x16\x6d\x7d\x35\x00\x29\x38\xf0\x56\xab\xaa\xbb\xd7\xeb\xbf\xd9\x4f\xf6\x43\x05\x9d\xc0\x88\x9a\x0f\x41\x15\x11\x67\xa6\x1f\x63\x99\x0c\x1d\xde\xf7\xd5\x2a\xb1\x2d\x1c\xda\x8f\xd8\x68\xf7\xc1\xf3\xca\xfb\x57\x13\x86\x66\xa6\x39\x03\x98\x4a\x05\x14\x0b\x2e\x97\x39\x0a\xd3\x2e\x27\xde\xbe\x37\x7d\x29\xf6\x15\xf0\x14\xc1\x2b\xc1\x86\x4c\x95\xc2\xb0\x7c\x13\x4e\x5d\x16\x85\x54\x06\x29\xdc\x2f\xe1\x73\x81\xc2\xcd\xaa\x82\x13\x33\x95\x2a\x6f\x17\x33\x0c\xcb\x3f\xe5\xf5\xdc\x89\x87\x8c\x68\x48\x33\xa9\x51\x00\x81\x82\x28\xc3\xd2\x92\x13\xb5\x21\xb2\x9e\x5a\x62\x92\x5a\x19\xed\xe2\xf6\x41\xf4\x77\x9e\xd8\x3a\xd7\x98\x9a\x65\x81\x67\xa0\xd1\x80\x91\x20\x24\xc5\x9f\xba\xad\xe3\x22\xad\xbd\xd4\xb7\x56\x5d\x69\x32\x14\x86\xa5\x6e\x29\x9f\xe3\xb2\x89\x79\x2a\xc5\x94\xcd\x4a\x85\xb4\x3d\x1a\x7d\x10\x5a\x25\x6c\xb6\xd6\x9e\xc4\x61\xbb\x56\xba\xcd\x2e\xd1\x97\xaf\xc3\x30\xca\xbf\xd5\x2a\x21\x05\xb3\xff\xad\xd7\x67\x30\x55\x32\xaf\x1f\x69\x59\xaa\x14\x43\xab\xed\x20\xa8\x60\xbf\x37\x7d\xa5\xd1\xec\x00\x94\x26\x8b\x13\x13\x0d\x11\xd7\x15\xab\x55\xb2\xf9\x7f\xd7\xa3\xcd\xc3\x38\x55\xc3\x31\xbd\x32\xdf\x12\xc6\x91\xda\x99\x34\x43\xb7\x33\x3c\x9b\x70\xda\xc1\xda\x65\xe9\x6b\xb5\x2c\x69\x54\x0b\x96\xe2\x2b\xcb\x84\x4a\x85\x14\x8f\x06\xef\x15\x7f\x63\x88\xaa\x56\x81\x52\xe4\x44\xe9\x8c\xf0\x9d\xc5\x93\x89\xa9\x74\xd0\x5c\xa6\x84\xc3\x82\xf0\x12\x75\xbb\xd4\x81\x60\x2d\x8b\x5e\x08\x82\x09\x83\x4a\x60\x68\xbf\x8a\xb6\xf7\xd2\xbf\xde\x6c\x68\x90\xca\xbc\xe0\x68\xc3\xad\xcb\x34\x45\xad\xa7\x25\xe7\xcb\x76\xe6\x28\x53\x2f\xe9\x3b\x69\x00\x95\x92\x0a\x52\x85\xc4\xd8\x0d\xb7\x20\xe9\x9c\xcc\x10\x1e\x98\xc9\xea\xef\x72\xd4\x9a\xcc\x76\x3a\x17\x88\xa0\x8d\x9d\xa4\xee\x0b\xfb\x21\x34\xaa\x0e\x42\x15\xeb\x94\xdb\xef\xfe\x87\x7d\xda\xce\xb4\x3f\x39\xb3\x1d\xfd\xc6\x9a\xb7\xc8\x6a\x69\xec\x05\xbe\x10\x0b\xc2\x19\xad\xeb\x3c\x39\x85\x6f\x1d\x05\x5c\xc0\x20\xba\x37\x0a\x76\x8c\xae\xd8\x8f\x26\xd6\x19\x55\xf2\xa3\x4c\x96\x3d\x79\x3a\xdc\xd1\x68\x2a\x96\x6a\xb5\x37\xc4\x94\xda\x76\xed\x81\x7d\x3b\x08\x69\x6c\xbf\x19\xc5\x66\x33\x54\xc7\xe8\xba\xfd\xa9\xfa\x3a\x35\x45\xa4\xc7\xf4\x6c\x4f\xbe\xbe\x7b\xd3\x3d\x13\xd4\xfe\x7f\xc4\xf5\x7c\x7f\xca\xae\x5d\x5f\x4e\x6d\x5d\x8d\x82\xa2\x48\x97\xd6\x94\x62\x71\x49\x72\x5c\xaf\x81\x32\x5a\x27\xf7\x6e\x77\xb7\x9b\xfb\x66\x6f\x87\xeb\x52\xc0\xdd\xb6\x06\x6c\x6a\xe3\x3b\x9b\x17\x29\xcc\xe5\x02\x5d\x29\x48\x38\x5f\xd6\xa5\x3b\x52\x20\x5a\xa3\x09\xa4\x56\xbf\x83\xb2\x40\xc8\x76\x76\xf5\xd5\x2a\x91\xa5\x29\x4a\xb3\x5e\x43\x92\x24\x41\x7f\x02\x66\x1d\x64\xd5\xb2\xd4\x97\xca\x6b\xd4\x41\xf4\x68\x4e\xf5\x25\x0c\x1a\x77\x10\x37\x43\xbd\x2f\x67\x9b\x5d\x24\x5d\x33\xb3\x86\xd2\xb6\xd9\x77\xd0\x3f\x1e\xd1\xbd\x98\x03\xa6\xfe\xe4\xed\x43\x02\x7f\x12\x91\x22\xe7\xb5\x79\xe7\xe1\x57\xd0\xa4\x83\xc4\x1a\xc4\x1d\xb1\x85\x6d\x5a\xaa\xa4\x6d\xa3\xf0\xec\x0f\x14\x4a\x3d\x20\xba\x56\x4d\xb7\x8c\x0c\xa8\x94\xda\x0c\x7f\x5f\xaf\x1b\x84\xe7\x43\x70\xbb\x1e\xb7\x0f\xdf\x58\xeb\x6e\xff\x87\x6e\x07\x71\xa1\xd9\x03\xbd\x23\x8d\xa0\xc8\xf1\x38\xd5\xe0\x78\x4c\xb1\x2e\x1d\x38\x53\x1f\x8b\xe7\xaf\x2a\xe4\x49\x3c\x0f\x5f\x85\x8c\x48\xd5\xd7\xa9\x03\x57\x21\x63\xf3\xc5\xba\x77\xf8\x13\xb2\x11\xa9\xbc\x4e\x7d\x3d\xbf\xbe\xbc\xb8\x7c\xf7\x0a\x6e\x33\x84\x89\x3b\x6f\x9e\xc0\xb7\xf3\x4f\x1f\xdd\xd9\xb9\xd8\x84\x14\x85\x61\xa6\x3a\x4d\xa7\x58\x28\x4c\x89\x41\x9a\xc0\x15\x47\xa2\x11\x4a\x8d\x30\xb1\x41\x9f\x00\x13\xda\x20\xb1\xb9\x3b\x50\xd4\xa9\x62\xf7\x48\x2d\x8e\x2e\x30\x65\xd3\xfa\x3d\x4c\xa0\xda\xf8\x6f\x2a\x8a\xed\xf7\x26\xd1\x3c\x62\xff\x8f\x47\xd9\x96\x47\xf9\x12\xd9\x8c\x68\xb8\x47\x14\x8f\x72\xa3\x4d\x7d\x16\xcc\xae\x86\xc1\x79\xc5\x5d\x05\xf2\xfb\xa1\x0a\xf7\xc3\x0c\xca\x1c\x53\xde\x08\xb2\x6e\xeb\xe9\x32\x86\xac\x61\x58\x41\x59\xcf\xea\xd3\x7d\xb5\x0d\x00\xf4\x0a\xbc\x7e\x5a\xb1\x0f\x15\x36\x00\xc8\x2b\xe8\xfc\xf9\x69\xc5\x50\x49\x83\xa0\x22\x16\x8e\x6d\x86\xee\x87\x6b\x0a\xcb\xf8\xb5\xa3\x1f\x62\xd7\x04\xa8\xb7\x8e\x5d\xb4\xba\xfa\x8b\x1a\xf3\x61\xf3\xe0\x28\xb2\x59\x64\x2f\xda\x08\xc3\x8e\x51\xe2\x4a\x8e\x5e\xa4\x91\xc6\x1d\xef\xa2\x99\x58\xc8\x39\x56\x69\xb4\x4b\xc4\x32\x14\x47\xca\x09\x8f\x2c\x22\x9c\x53\x7d\x22\x82\x12\x23\xd5\x12\xa6\x0c\x39\x85\x66\x51\xff\x82\x4a\xdb\x30\x37\x97\x35\x75\xe8\x65\xf2\x50\xb4\xb0\xb4\xa7\xc6\xcd\x4d\x26\xb2\x70\xb9\x91\x0d\x5b\x5a\x2a\x65\xeb\xf0\xed\xb1\xed\xc2\xb5\x8e\x10\xbb\x37\xfe\xb0\xc8\x7e\x64\x29\x0a\x8d\x23\x45\xb6\x05\x2d\x2e\xb2\x8d\xf1\xa1\x22\x3b\x18\x3f\x2c\xbf\x81\x5d\xad\x12\xee\x3e\x5e\xbc\x5e\xaf\x1b\x16\x02\xee\x95\xaf\x14\x18\x21\xb5\x17\x96\xff\x52\x31\xe6\x52\x2d\x6f\xd8\x2f\xb4\x95\x38\x67\x39\x33\xda\x3a\xd9\x5c\x04\x04\x9d\xc9\x92\x53\xdb\x39\x44\x54\x37\x2b\xec\xa4\xbe\x47\xf3\x60\x57\xac\x97\x7f\xfc\xb3\x9a\xbe\xff\x78\xf9\x47\xbb\xda\x51\x29\xfc\xb7\x0f\x59\x8e\xd2\xbd\x21\xef\x0d\xff\xe2\x45\x05\xff\xf7\x17\xf6\x2f\x70\x29\x71\x4c\x0a\xaf\x13\x5c\xce\x86\xc6\xc8\xe1\xbf\x0c\xc8\x1f\x09\x3c\x3c\xb2\x9b\xeb\x0a\x15\x83\xbb\x0d\x38\xa9\xe3\x36\xb1\xcc\xf5\x09\xdd\x2e\x33\xd3\xc0\x66\x42\xaa\x9d\xba\x32\xcd\x30\x9d\xbb\x0d\x21\xa6\x88\x3d\x0c\x69\x7f\x47\xb7\xa3\xfc\xb8\xbe\x8e\xc2\xdb\xdf\xdd\x7a\x40\x1d\xd7\xd7\xfd\x49\xbb\x96\xe6\x6a\x6a\xb8\xe5\x34\x67\x46\xb8\xbc\x78\x73\xdf\x33\x23\x62\x46\xee\x39\x02\xd1\xee\x6e\xed\xc3\x19\x3c\x64\x2c\xcd\xe0\x81\x71\x6e\xe7\x4f\xc3\x1f\xb3\x74\x8f\xc8\xe5\x75\xab\xba\xc2\x2e\xa7\xd5\x7e\x95\xcc\x71\x19\xba\x69\xe4\x6f\xdb\x0d\x9b\xa2\x32\xd1\xb8\xdb\xc6\xc1\x1b\xa1\x4d\x7b\x52\x14\xbc\xb9\x55\x5c\xdd\x6c\xad\xea\x14\xf7\x5a\xc9\x6e\x72\x62\xe7\x55\x9d\xbb\xc8\x4f\x4c\x75\x65\x7f\xfb\xf8\x2d\xb3\xa9\xfd\x0f\xa0\x12\x5d\x58\x73\x62\xd2\xac\x42\xef\x66\x6a\x7e\x24\xb0\x76\x64\xf9\xa3\xdf\x0c\xd4\x54\xcd\xc3\x9a\xa8\xed\x85\xd0\xff\x85\x6b\xe1\xb9\xb3\x4b\xe4\xd1\x5f\x0d\x5a\x2d\xa5\xb0\x23\x77\x7b\x9a\x78\x06\xc5\xf6\x34\xb1\xfe\x2d\x48\x73\x9c\x18\x31\x89\x0e\x43\xda\xcb\xd1\xc7\xb1\x3b\x8a\x9b\xa3\x50\x5a\x27\x4f\x4e\x7e\x9c\xfc\x27\x00\x00\xff\xff\x3b\xec\xdb\xc6\x09\x37\x00\x00")
func wski18nResourcesEn_usAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesEn_usAllJson,
- "wski18n/resources/en_US.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesEn_usAllJson,
+ "wski18n/resources/en_US.all.json",
+ )
}
func wski18nResourcesEn_usAllJson() (*asset, error) {
- bytes, err := wski18nResourcesEn_usAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesEn_usAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 13627, mode: os.FileMode(420), modTime: time.Unix(1507040831, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 14089, mode: os.FileMode(420), modTime: time.Unix(1508886382, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesEs_esAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesEs_esAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesEs_esAllJson,
- "wski18n/resources/es_ES.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesEs_esAllJson,
+ "wski18n/resources/es_ES.all.json",
+ )
}
func wski18nResourcesEs_esAllJson() (*asset, error) {
- bytes, err := wski18nResourcesEs_esAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesEs_esAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/es_ES.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/es_ES.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesFr_frAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8a\xe6\x52\x50\xa8\xe6\x52\x50\x50\x50\x50\xca\x4c\x51\xb2\x52\x50\x4a\xaa\x2c\x48\x2c\x2e\x56\x48\x4e\x2d\x2a\xc9\x4c\xcb\x4c\x4e\x2c\x49\x55\x48\xce\x48\x4d\xce\xce\xcc\x4b\x57\xd2\x81\x28\x2c\x29\x4a\xcc\x2b\xce\x49\x2c\xc9\xcc\xcf\x03\xe9\x08\xce\xcf\x4d\x55\x40\x12\x53\xc8\xcc\x53\x70\x2b\x4a\xcd\x4b\xce\x50\xe2\x52\x50\xa8\xe5\x8a\xe5\x02\x04\x00\x00\xff\xff\x45\xa4\xe9\x62\x65\x00\x00\x00")
func wski18nResourcesFr_frAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesFr_frAllJson,
- "wski18n/resources/fr_FR.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesFr_frAllJson,
+ "wski18n/resources/fr_FR.all.json",
+ )
}
func wski18nResourcesFr_frAllJson() (*asset, error) {
- bytes, err := wski18nResourcesFr_frAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesFr_frAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/fr_FR.all.json", size: 101, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/fr_FR.all.json", size: 101, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesIt_itAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesIt_itAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesIt_itAllJson,
- "wski18n/resources/it_IT.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesIt_itAllJson,
+ "wski18n/resources/it_IT.all.json",
+ )
}
func wski18nResourcesIt_itAllJson() (*asset, error) {
- bytes, err := wski18nResourcesIt_itAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesIt_itAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/it_IT.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/it_IT.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesJa_jaAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesJa_jaAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesJa_jaAllJson,
- "wski18n/resources/ja_JA.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesJa_jaAllJson,
+ "wski18n/resources/ja_JA.all.json",
+ )
}
func wski18nResourcesJa_jaAllJson() (*asset, error) {
- bytes, err := wski18nResourcesJa_jaAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesJa_jaAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/ja_JA.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/ja_JA.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesKo_krAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesKo_krAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesKo_krAllJson,
- "wski18n/resources/ko_KR.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesKo_krAllJson,
+ "wski18n/resources/ko_KR.all.json",
+ )
}
func wski18nResourcesKo_krAllJson() (*asset, error) {
- bytes, err := wski18nResourcesKo_krAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesKo_krAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/ko_KR.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/ko_KR.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesPt_brAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesPt_brAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesPt_brAllJson,
- "wski18n/resources/pt_BR.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesPt_brAllJson,
+ "wski18n/resources/pt_BR.all.json",
+ )
}
func wski18nResourcesPt_brAllJson() (*asset, error) {
- bytes, err := wski18nResourcesPt_brAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesPt_brAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/pt_BR.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/pt_BR.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesZh_hansAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesZh_hansAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesZh_hansAllJson,
- "wski18n/resources/zh_Hans.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesZh_hansAllJson,
+ "wski18n/resources/zh_Hans.all.json",
+ )
}
func wski18nResourcesZh_hansAllJson() (*asset, error) {
- bytes, err := wski18nResourcesZh_hansAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesZh_hansAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/zh_Hans.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/zh_Hans.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
var _wski18nResourcesZh_hantAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func wski18nResourcesZh_hantAllJsonBytes() ([]byte, error) {
- return bindataRead(
- _wski18nResourcesZh_hantAllJson,
- "wski18n/resources/zh_Hant.all.json",
- )
+ return bindataRead(
+ _wski18nResourcesZh_hantAllJson,
+ "wski18n/resources/zh_Hant.all.json",
+ )
}
func wski18nResourcesZh_hantAllJson() (*asset, error) {
- bytes, err := wski18nResourcesZh_hantAllJsonBytes()
- if err != nil {
- return nil, err
- }
+ bytes, err := wski18nResourcesZh_hantAllJsonBytes()
+ if err != nil {
+ return nil, err
+ }
- info := bindataFileInfo{name: "wski18n/resources/zh_Hant.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1500653295, 0)}
- a := &asset{bytes: bytes, info: info}
- return a, nil
+ info := bindataFileInfo{name: "wski18n/resources/zh_Hant.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1501631495, 0)}
+ a := &asset{bytes: bytes, info: info}
+ return a, nil
}
// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
- a, err := f()
- if err != nil {
- return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
- }
- return a.bytes, nil
- }
- return nil, fmt.Errorf("Asset %s not found", name)
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[cannonicalName]; ok {
+ a, err := f()
+ if err != nil {
+ return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
+ }
+ return a.bytes, nil
+ }
+ return nil, fmt.Errorf("Asset %s not found", name)
}
// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
- a, err := Asset(name)
- if err != nil {
- panic("asset: Asset(" + name + "): " + err.Error())
- }
+ a, err := Asset(name)
+ if err != nil {
+ panic("asset: Asset(" + name + "): " + err.Error())
+ }
- return a
+ return a
}
// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- if f, ok := _bindata[cannonicalName]; ok {
- a, err := f()
- if err != nil {
- return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
- }
- return a.info, nil
- }
- return nil, fmt.Errorf("AssetInfo %s not found", name)
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[cannonicalName]; ok {
+ a, err := f()
+ if err != nil {
+ return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
+ }
+ return a.info, nil
+ }
+ return nil, fmt.Errorf("AssetInfo %s not found", name)
}
// AssetNames returns the names of the assets.
func AssetNames() []string {
- names := make([]string, 0, len(_bindata))
- for name := range _bindata {
- names = append(names, name)
- }
- return names
+ names := make([]string, 0, len(_bindata))
+ for name := range _bindata {
+ names = append(names, name)
+ }
+ return names
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
- "wski18n/resources/de_DE.all.json": wski18nResourcesDe_deAllJson,
- "wski18n/resources/en_US.all.json": wski18nResourcesEn_usAllJson,
- "wski18n/resources/es_ES.all.json": wski18nResourcesEs_esAllJson,
- "wski18n/resources/fr_FR.all.json": wski18nResourcesFr_frAllJson,
- "wski18n/resources/it_IT.all.json": wski18nResourcesIt_itAllJson,
- "wski18n/resources/ja_JA.all.json": wski18nResourcesJa_jaAllJson,
- "wski18n/resources/ko_KR.all.json": wski18nResourcesKo_krAllJson,
- "wski18n/resources/pt_BR.all.json": wski18nResourcesPt_brAllJson,
- "wski18n/resources/zh_Hans.all.json": wski18nResourcesZh_hansAllJson,
- "wski18n/resources/zh_Hant.all.json": wski18nResourcesZh_hantAllJson,
+ "wski18n/resources/de_DE.all.json": wski18nResourcesDe_deAllJson,
+ "wski18n/resources/en_US.all.json": wski18nResourcesEn_usAllJson,
+ "wski18n/resources/es_ES.all.json": wski18nResourcesEs_esAllJson,
+ "wski18n/resources/fr_FR.all.json": wski18nResourcesFr_frAllJson,
+ "wski18n/resources/it_IT.all.json": wski18nResourcesIt_itAllJson,
+ "wski18n/resources/ja_JA.all.json": wski18nResourcesJa_jaAllJson,
+ "wski18n/resources/ko_KR.all.json": wski18nResourcesKo_krAllJson,
+ "wski18n/resources/pt_BR.all.json": wski18nResourcesPt_brAllJson,
+ "wski18n/resources/zh_Hans.all.json": wski18nResourcesZh_hansAllJson,
+ "wski18n/resources/zh_Hant.all.json": wski18nResourcesZh_hantAllJson,
}
// AssetDir returns the file names below a certain
@@ -372,92 +372,92 @@
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
- node := _bintree
- if len(name) != 0 {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- pathList := strings.Split(cannonicalName, "/")
- for _, p := range pathList {
- node = node.Children[p]
- if node == nil {
- return nil, fmt.Errorf("Asset %s not found", name)
- }
- }
- }
- if node.Func != nil {
- return nil, fmt.Errorf("Asset %s not found", name)
- }
- rv := make([]string, 0, len(node.Children))
- for childName := range node.Children {
- rv = append(rv, childName)
- }
- return rv, nil
+ node := _bintree
+ if len(name) != 0 {
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ pathList := strings.Split(cannonicalName, "/")
+ for _, p := range pathList {
+ node = node.Children[p]
+ if node == nil {
+ return nil, fmt.Errorf("Asset %s not found", name)
+ }
+ }
+ }
+ if node.Func != nil {
+ return nil, fmt.Errorf("Asset %s not found", name)
+ }
+ rv := make([]string, 0, len(node.Children))
+ for childName := range node.Children {
+ rv = append(rv, childName)
+ }
+ return rv, nil
}
type bintree struct {
- Func func() (*asset, error)
- Children map[string]*bintree
+ Func func() (*asset, error)
+ Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
- "wski18n": &bintree{nil, map[string]*bintree{
- "resources": &bintree{nil, map[string]*bintree{
- "de_DE.all.json": &bintree{wski18nResourcesDe_deAllJson, map[string]*bintree{}},
- "en_US.all.json": &bintree{wski18nResourcesEn_usAllJson, map[string]*bintree{}},
- "es_ES.all.json": &bintree{wski18nResourcesEs_esAllJson, map[string]*bintree{}},
- "fr_FR.all.json": &bintree{wski18nResourcesFr_frAllJson, map[string]*bintree{}},
- "it_IT.all.json": &bintree{wski18nResourcesIt_itAllJson, map[string]*bintree{}},
- "ja_JA.all.json": &bintree{wski18nResourcesJa_jaAllJson, map[string]*bintree{}},
- "ko_KR.all.json": &bintree{wski18nResourcesKo_krAllJson, map[string]*bintree{}},
- "pt_BR.all.json": &bintree{wski18nResourcesPt_brAllJson, map[string]*bintree{}},
- "zh_Hans.all.json": &bintree{wski18nResourcesZh_hansAllJson, map[string]*bintree{}},
- "zh_Hant.all.json": &bintree{wski18nResourcesZh_hantAllJson, map[string]*bintree{}},
- }},
- }},
+ "wski18n": &bintree{nil, map[string]*bintree{
+ "resources": &bintree{nil, map[string]*bintree{
+ "de_DE.all.json": &bintree{wski18nResourcesDe_deAllJson, map[string]*bintree{}},
+ "en_US.all.json": &bintree{wski18nResourcesEn_usAllJson, map[string]*bintree{}},
+ "es_ES.all.json": &bintree{wski18nResourcesEs_esAllJson, map[string]*bintree{}},
+ "fr_FR.all.json": &bintree{wski18nResourcesFr_frAllJson, map[string]*bintree{}},
+ "it_IT.all.json": &bintree{wski18nResourcesIt_itAllJson, map[string]*bintree{}},
+ "ja_JA.all.json": &bintree{wski18nResourcesJa_jaAllJson, map[string]*bintree{}},
+ "ko_KR.all.json": &bintree{wski18nResourcesKo_krAllJson, map[string]*bintree{}},
+ "pt_BR.all.json": &bintree{wski18nResourcesPt_brAllJson, map[string]*bintree{}},
+ "zh_Hans.all.json": &bintree{wski18nResourcesZh_hansAllJson, map[string]*bintree{}},
+ "zh_Hant.all.json": &bintree{wski18nResourcesZh_hantAllJson, map[string]*bintree{}},
+ }},
+ }},
}}
// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
- data, err := Asset(name)
- if err != nil {
- return err
- }
- info, err := AssetInfo(name)
- if err != nil {
- return err
- }
- err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
- if err != nil {
- return err
- }
- err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
- if err != nil {
- return err
- }
- err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
- if err != nil {
- return err
- }
- return nil
+ data, err := Asset(name)
+ if err != nil {
+ return err
+ }
+ info, err := AssetInfo(name)
+ if err != nil {
+ return err
+ }
+ err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
+ if err != nil {
+ return err
+ }
+ err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
+ if err != nil {
+ return err
+ }
+ err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
+ if err != nil {
+ return err
+ }
+ return nil
}
// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
- children, err := AssetDir(name)
- // File
- if err != nil {
- return RestoreAsset(dir, name)
- }
- // Dir
- for _, child := range children {
- err = RestoreAssets(dir, filepath.Join(name, child))
- if err != nil {
- return err
- }
- }
- return nil
+ children, err := AssetDir(name)
+ // File
+ if err != nil {
+ return RestoreAsset(dir, name)
+ }
+ // Dir
+ for _, child := range children {
+ err = RestoreAssets(dir, filepath.Join(name, child))
+ if err != nil {
+ return err
+ }
+ }
+ return nil
}
func _filePath(dir, name string) string {
- cannonicalName := strings.Replace(name, "\\", "/", -1)
- return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}
diff --git a/wski18n/resources/en_US.all.json b/wski18n/resources/en_US.all.json
index 34a6be1..8cfb67c 100644
--- a/wski18n/resources/en_US.all.json
+++ b/wski18n/resources/en_US.all.json
@@ -334,6 +334,14 @@
{
"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"
}
]