You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/11/14 22:32:43 UTC
[GitHub] mrutkows closed pull request #644: Adding managed deployment model
mrutkows closed pull request #644: Adding managed deployment model
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/644
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/cmd/root.go b/cmd/root.go
index 331621c..4831c7b 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -36,10 +36,10 @@ import (
var stderr = ""
var stdout = ""
var RootCmd = &cobra.Command{
- Use: "wskdeploy",
- SilenceErrors: true,
- SilenceUsage: true,
- Short: "A tool set to help deploy your openwhisk packages in batch.",
+ Use: "wskdeploy",
+ SilenceErrors: true,
+ SilenceUsage: true,
+ Short: "A tool set to help deploy your openwhisk packages in batch.",
Long: `A tool to deploy openwhisk packages with a manifest and/or deployment yaml file.
wskdeploy without any commands or flags deploys openwhisk package in the current directory if manifest.yaml exists.
@@ -111,7 +111,7 @@ func init() {
RootCmd.Flags().StringVarP(&utils.Flags.ProjectPath, "project", "p", ".", "path to serverless project")
RootCmd.Flags().StringVarP(&utils.Flags.ManifestPath, "manifest", "m", "", "path to manifest file")
RootCmd.Flags().StringVarP(&utils.Flags.DeploymentPath, "deployment", "d", "", "path to deployment file")
- RootCmd.PersistentFlags().BoolVarP(&utils.Flags.Strict,"strict", "s", false, "allow user defined runtime version")
+ RootCmd.PersistentFlags().BoolVarP(&utils.Flags.Strict, "strict", "s", false, "allow user defined runtime version")
RootCmd.PersistentFlags().BoolVarP(&utils.Flags.UseInteractive, "allow-interactive", "i", false, "allow interactive prompts")
RootCmd.PersistentFlags().BoolVarP(&utils.Flags.UseDefaults, "allow-defaults", "a", false, "allow defaults")
RootCmd.PersistentFlags().BoolVarP(&utils.Flags.Verbose, "verbose", "v", false, "verbose output")
@@ -119,8 +119,9 @@ func init() {
RootCmd.PersistentFlags().StringVarP(&utils.Flags.Namespace, "namespace", "n", "", wski18n.T("namespace"))
RootCmd.PersistentFlags().StringVarP(&utils.Flags.Auth, "auth", "u", "", wski18n.T("authorization `KEY`"))
RootCmd.PersistentFlags().StringVar(&utils.Flags.ApiVersion, "apiversion", "", wski18n.T("whisk API `VERSION`"))
- RootCmd.PersistentFlags().StringVarP(&utils.Flags.Key, "key", "k", "", wski18n.T("path of the .key file"))
- RootCmd.PersistentFlags().StringVarP(&utils.Flags.Cert, "cert", "c", "", wski18n.T("path of the .cert file"))
+ RootCmd.PersistentFlags().StringVarP(&utils.Flags.Key, "key", "k", "", wski18n.T("path of the .key file"))
+ RootCmd.PersistentFlags().StringVarP(&utils.Flags.Cert, "cert", "c", "", wski18n.T("path of the .cert file"))
+ RootCmd.PersistentFlags().BoolVarP(&utils.Flags.Managed, "managed", "", false, "mark project entities as managed")
}
// initConfig reads in config file and ENV variables if set.
@@ -315,7 +316,7 @@ func Undeploy() error {
verifiedPlan, err := deployer.ConstructUnDeploymentPlan()
if err != nil {
- return err
+ return err
}
err = deployer.UnDeploy(verifiedPlan)
diff --git a/deployers/manifestreader.go b/deployers/manifestreader.go
index 6fc6369..16dd7a4 100644
--- a/deployers/manifestreader.go
+++ b/deployers/manifestreader.go
@@ -52,8 +52,8 @@ func (deployer *ManifestReader) ParseManifest() (*parsers.YAML, *parsers.YAMLPar
return manifest, manifestParser, nil
}
-func (reader *ManifestReader) InitRootPackage(manifestParser *parsers.YAMLParser, manifest *parsers.YAML) error {
- packages, err := manifestParser.ComposeAllPackages(manifest, reader.serviceDeployer.ManifestPath)
+func (reader *ManifestReader) InitRootPackage(manifestParser *parsers.YAMLParser, manifest *parsers.YAML, ma whisk.KeyValue) error {
+ packages, err := manifestParser.ComposeAllPackages(manifest, reader.serviceDeployer.ManifestPath, ma)
if err != nil {
return utils.NewYAMLFormatError(err.Error())
}
@@ -63,7 +63,7 @@ func (reader *ManifestReader) InitRootPackage(manifestParser *parsers.YAMLParser
}
// Wrapper parser to handle yaml dir
-func (deployer *ManifestReader) HandleYaml(sdeployer *ServiceDeployer, manifestParser *parsers.YAMLParser, manifest *parsers.YAML) error {
+func (deployer *ManifestReader) HandleYaml(sdeployer *ServiceDeployer, manifestParser *parsers.YAMLParser, manifest *parsers.YAML, ma whisk.KeyValue) error {
var err error
deps, err := manifestParser.ComposeDependenciesFromAllPackages(manifest, deployer.serviceDeployer.ProjectPath, deployer.serviceDeployer.ManifestPath)
@@ -71,17 +71,17 @@ func (deployer *ManifestReader) HandleYaml(sdeployer *ServiceDeployer, manifestP
return utils.NewYAMLFormatError(err.Error())
}
- actions, err := manifestParser.ComposeActionsFromAllPackages(manifest, deployer.serviceDeployer.ManifestPath)
+ actions, err := manifestParser.ComposeActionsFromAllPackages(manifest, deployer.serviceDeployer.ManifestPath, ma)
if err != nil {
return utils.NewYAMLFormatError(err.Error())
}
- sequences, err := manifestParser.ComposeSequencesFromAllPackages(deployer.serviceDeployer.ClientConfig.Namespace, manifest)
+ sequences, err := manifestParser.ComposeSequencesFromAllPackages(deployer.serviceDeployer.ClientConfig.Namespace, manifest, ma)
if err != nil {
return utils.NewYAMLFormatError(err.Error())
}
- triggers, err := manifestParser.ComposeTriggersFromAllPackages(manifest, deployer.serviceDeployer.ManifestPath)
+ triggers, err := manifestParser.ComposeTriggersFromAllPackages(manifest, deployer.serviceDeployer.ManifestPath, ma)
if err != nil {
return utils.NewYAMLFormatError(err.Error())
}
diff --git a/deployers/manifestreader_test.go b/deployers/manifestreader_test.go
index 8b1377f..4d311f2 100644
--- a/deployers/manifestreader_test.go
+++ b/deployers/manifestreader_test.go
@@ -23,6 +23,7 @@ import (
"github.com/apache/incubator-openwhisk-wskdeploy/parsers"
"github.com/stretchr/testify/assert"
"testing"
+ "github.com/apache/incubator-openwhisk-client-go/whisk"
)
var mr *ManifestReader
@@ -46,14 +47,14 @@ func TestManifestReader_ParseManifest(t *testing.T) {
// Test could Init root package successfully.
func TestManifestReader_InitRootPackage(t *testing.T) {
- err := mr.InitRootPackage(ps, ms)
+ err := mr.InitRootPackage(ps, ms, whisk.KeyValue{})
assert.Equal(t, err, nil, "Init Root Package failed")
}
// Test Parameters
func TestManifestReader_param(t *testing.T) {
ms, _ := ps.ParseManifest("../tests/dat/manifest6.yaml")
- err := mr.InitRootPackage(ps, ms)
+ err := mr.InitRootPackage(ps, ms, whisk.KeyValue{})
assert.Equal(t, err, nil, "Init Root Package failed")
// TODO.
diff --git a/deployers/servicedeployer.go b/deployers/servicedeployer.go
index 57b1c64..fae8d93 100644
--- a/deployers/servicedeployer.go
+++ b/deployers/servicedeployer.go
@@ -71,6 +71,7 @@ func NewDeploymentPackage() *DeploymentPackage {
// 3. Collect information about the source code files in the working directory
// 4. Create a deployment plan to create OpenWhisk service
type ServiceDeployer struct {
+ ProjectName string
Deployment *DeploymentProject
Client *whisk.Client
mt sync.RWMutex
@@ -85,6 +86,7 @@ type ServiceDeployer struct {
InteractiveChoice bool
ClientConfig *whisk.Config
DependencyMaster map[string]utils.DependencyRecord
+ ManagedAnnotation whisk.KeyValue
}
// NewServiceDeployer is a Factory to create a new ServiceDeployer
@@ -121,8 +123,26 @@ func (deployer *ServiceDeployer) ConstructDeploymentPlan() error {
}
deployer.RootPackageName = manifest.Package.Packagename
+ deployer.ProjectName = manifest.GetProject().Name
+
+ // Generate Managed Annotations if its marked as a Managed Deployment
+ // Managed deployments are the ones when OpenWhisk entities are deployed with command line flag --managed.
+ // Which results in a hidden annotation in every OpenWhisk entity in manifest file.
+ if utils.Flags.Managed {
+ // OpenWhisk entities are annotated with Project Name and therefore
+ // Project Name in manifest/deployment file is mandatory for managed deployments
+ if deployer.ProjectName == "" {
+ return utils.NewYAMLFormatError("Project name in manifest file is mandatory for managed deployments")
+ }
+ // Every OpenWhisk entity in the manifest file will be annotated with:
+ //managed: '{"__OW__PROJECT__NAME": <name>, "__OW__PROJECT_HASH": <hash>, "__OW__FILE": <path>}'
+ deployer.ManagedAnnotation, err = utils.GenerateManagedAnnotation(deployer.ProjectName, manifest.Filepath)
+ if err != nil {
+ return utils.NewYAMLFormatError(err.Error())
+ }
+ }
- manifestReader.InitRootPackage(manifestParser, manifest)
+ manifestReader.InitRootPackage(manifestParser, manifest, deployer.ManagedAnnotation)
if deployer.IsDefault == true {
fileReader := NewFileSystemReader(deployer)
@@ -134,7 +154,7 @@ func (deployer *ServiceDeployer) ConstructDeploymentPlan() error {
}
// process manifest file
- err = manifestReader.HandleYaml(deployer, manifestParser, manifest)
+ err = manifestReader.HandleYaml(deployer, manifestParser, manifest, deployer.ManagedAnnotation)
if err != nil {
return err
}
@@ -194,7 +214,7 @@ func (deployer *ServiceDeployer) ConstructUnDeploymentPlan() (*DeploymentProject
}
deployer.RootPackageName = manifest.Package.Packagename
- manifestReader.InitRootPackage(manifestParser, manifest)
+ manifestReader.InitRootPackage(manifestParser, manifest, whisk.KeyValue{})
// process file system
if deployer.IsDefault == true {
@@ -212,7 +232,7 @@ func (deployer *ServiceDeployer) ConstructUnDeploymentPlan() (*DeploymentProject
}
// process manifest file
- err = manifestReader.HandleYaml(deployer, manifestParser, manifest)
+ err = manifestReader.HandleYaml(deployer, manifestParser, manifest, whisk.KeyValue{})
if err != nil {
return deployer.Deployment, err
}
@@ -338,6 +358,18 @@ func (deployer *ServiceDeployer) deployAssets() error {
return err
}
+ // During managed deployments, after deploying list of entities in a project
+ // refresh previously deployed project entities, delete the assets which is no longer part of the project
+ // i.e. in a subsequent managed deployment of the same project minus few OpenWhisk entities
+ // from the manifest file must result in undeployment of those deleted entities
+ if utils.Flags.Managed {
+ if err := deployer.RefreshManagedEntities(deployer.ManagedAnnotation); err != nil {
+ errString := wski18n.T("Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n")
+ whisk.Debug(whisk.DbgError, errString)
+ return err
+ }
+ }
+
return nil
}
@@ -426,6 +458,134 @@ func (deployer *ServiceDeployer) DeployDependencies() error {
return nil
}
+func (deployer *ServiceDeployer) RefreshManagedEntities(maValue whisk.KeyValue) error {
+
+ ma := maValue.Value.(map[string]interface{})
+ if err := deployer.RefreshManagedTriggers(ma); err != nil {
+ return err
+ }
+
+ //if err := deployer.RefreshManagedRules(ma); err != nil {
+ // return err
+ //}
+
+ //if err := deployer.RefreshManagedPackages(ma); err != nil {
+ // return err
+ //}
+
+ return nil
+
+}
+func (deployer *ServiceDeployer) RefreshManagedActions(packageName string, ma map[string]interface{}) error {
+ options := whisk.ActionListOptions{}
+ // get a list of actions in your namespace
+ actions, _, err := deployer.Client.Actions.List(packageName, &options)
+ if err != nil {
+ return err
+ }
+ // iterate over list of actions to find an action with managed annotations
+ // check if "managed" annotation is attached to an action
+ for _, action := range actions {
+ // an annotation with "managed" key indicates that an action was deployed as part of managed deployment
+ // if such annotation exists, check if it belongs to the current managed deployment
+ // this action has attached managed annotations
+ if a := action.Annotations.GetValue(utils.MANAGED); a != nil {
+ // decode the JSON blob and retrieve __OW_PROJECT_NAME and __OW_PROJECT_HASH
+ aa := a.(map[string]interface{})
+ // we have found an action which was earlier part of the current project
+ // and this action was deployed as part of managed deployment and now
+ // must be undeployed as its not part of the project anymore
+ // The annotation with same project name but different project hash indicates
+ // that this action is deleted from the project in manifest file
+ if aa[utils.OW_PROJECT_NAME] == ma[utils.OW_PROJECT_NAME] && aa[utils.OW_PROJECT_HASH] != ma[utils.OW_PROJECT_HASH] {
+ actionName := strings.Join([]string{packageName, action.Name}, "/")
+ output := wski18n.T("Found the action {{.action}} which is deleted" +
+ " from the current project {{.project}} in manifest file which is being undeployed.\n",
+ map[string]interface{}{"action": actionName, "project": aa[utils.OW_PROJECT_NAME]})
+ whisk.Debug(whisk.DbgInfo, output)
+ _, err := deployer.Client.Actions.Delete(actionName)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ }
+ return nil
+}
+
+func (deployer *ServiceDeployer) RefreshManagedTriggers(ma map[string]interface{}) error {
+ options := whisk.TriggerListOptions{}
+ // Get list of triggers in your namespace
+ triggers, _, err := deployer.Client.Triggers.List(&options)
+ if err != nil {
+ return err
+ }
+ // iterate over the list of triggers to determine whether any of them was part of managed project
+ // and now deleted from manifest file we can determine that from the managed annotation
+ // If a trigger has attached managed annotation with the project name equals to the current project name
+ // but the project hash is different (project hash differs since the trigger is deleted from the manifest file)
+ for _, trigger := range triggers {
+ // trigger has attached managed annotation
+ if a := trigger.Annotations.GetValue(utils.MANAGED); a != nil {
+ // decode the JSON blob and retrieve __OW_PROJECT_NAME and __OW_PROJECT_HASH
+ ta := a.(map[string]interface{})
+ if ta[utils.OW_PROJECT_NAME] == ma[utils.OW_PROJECT_NAME] && ta[utils.OW_PROJECT_HASH] != ma[utils.OW_PROJECT_HASH] {
+ // we have found a trigger which was earlier part of the current project
+ output := wski18n.T("Found the trigger {{.trigger}} which is deleted" +
+ " from the current project {{.project}} in manifest file which is being undeployed.\n",
+ map[string]interface{}{"trigger": trigger.Name, "project": ma[utils.OW_PROJECT_NAME]})
+ whisk.Debug(whisk.DbgInfo, output)
+ _, _, err := deployer.Client.Triggers.Delete(trigger.Name)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ }
+ return nil
+}
+
+func (deployer *ServiceDeployer) RefreshManagedRules(ma map[string]interface{}) error {
+ return nil
+}
+
+func (deployer *ServiceDeployer) RefreshManagedPackages(ma map[string]interface{}) error {
+ options := whisk.PackageListOptions{}
+ // Get the list of packages in your namespace
+ packages, _, err := deployer.Client.Packages.List(&options)
+ if err != nil {
+ return err
+ }
+ // iterate over each package to find managed annotations
+ // check if "managed" annotation is attached to a package
+ // when managed project name matches with the current project name and project
+ // hash differs, indicates that the package was part of the current project but
+ // now is deleted from the manifest file and should be undeployed.
+ for _, pkg := range packages {
+ if a := pkg.Annotations.GetValue(utils.MANAGED); a != nil {
+ // decode the JSON blob and retrieve __OW_PROJECT_NAME and __OW_PROJECT_HASH
+ pa := a.(map[string]interface{})
+ // perform the similar check on the list of actions from this package
+ // since package can not be deleted if its not empty (has any action or sequence)
+ if err := deployer.RefreshManagedActions(pkg.Name, ma); err != nil {
+ return err
+ }
+ // we have found a package which was earlier part of the current project
+ if pa[utils.OW_PROJECT_NAME] == ma[utils.OW_PROJECT_NAME] && pa[utils.OW_PROJECT_HASH] != ma[utils.OW_PROJECT_HASH] {
+ output := wski18n.T("Found the package {{.package}} which is deleted" +
+ " from the current project {{.project}} in manifest file which is being undeployed.\n",
+ map[string]interface{}{"package": pkg.Name, "project": pa[utils.OW_PROJECT_NAME]})
+ whisk.Debug(whisk.DbgInfo, output)
+ _, err := deployer.Client.Packages.Delete(pkg.Name)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ }
+ return nil
+}
+
func (deployer *ServiceDeployer) DeployPackages() error {
for _, pack := range deployer.Deployment.Packages {
err := deployer.createPackage(pack.Package)
diff --git a/parsers/manifest_parser.go b/parsers/manifest_parser.go
index 7028831..7bf678f 100644
--- a/parsers/manifest_parser.go
+++ b/parsers/manifest_parser.go
@@ -107,7 +107,7 @@ func (dm *YAMLParser) ComposeDependenciesFromAllPackages(manifest *YAML, project
if manifest.Package.Packagename != "" {
return dm.ComposeDependencies(manifest.Package, projectPath, filePath, manifest.Package.Packagename)
} else {
- if manifest.Packages != nil {
+ if len(manifest.Packages) != 0 {
packages = manifest.Packages
} else {
packages = manifest.GetProject().Packages
@@ -191,20 +191,20 @@ func (dm *YAMLParser) ComposeDependencies(pkg Package, projectPath string, fileP
return depMap, nil
}
-func (dm *YAMLParser) ComposeAllPackages(manifest *YAML, filePath string) (map[string]*whisk.Package, error) {
+func (dm *YAMLParser) ComposeAllPackages(manifest *YAML, filePath string, ma whisk.KeyValue) (map[string]*whisk.Package, error) {
packages := map[string]*whisk.Package{}
manifestPackages := make(map[string]Package)
if manifest.Package.Packagename != "" {
fmt.Println("WARNING: using package inside of manifest file will soon be deprecated, please use packages instead.")
- s, err := dm.ComposePackage(manifest.Package, manifest.Package.Packagename, filePath)
+ s, err := dm.ComposePackage(manifest.Package, manifest.Package.Packagename, filePath, ma)
if err == nil {
packages[manifest.Package.Packagename] = s
} else {
return nil, err
}
} else {
- if manifest.Packages != nil {
+ if len(manifest.Packages) != 0 {
manifestPackages = manifest.Packages
} else {
manifestPackages = manifest.GetProject().Packages
@@ -212,7 +212,7 @@ func (dm *YAMLParser) ComposeAllPackages(manifest *YAML, filePath string) (map[s
}
for n, p := range manifestPackages {
- s, err := dm.ComposePackage(p, n, filePath)
+ s, err := dm.ComposePackage(p, n, filePath, ma)
if err == nil {
packages[n] = s
@@ -224,7 +224,7 @@ func (dm *YAMLParser) ComposeAllPackages(manifest *YAML, filePath string) (map[s
return packages, nil
}
-func (dm *YAMLParser) ComposePackage(pkg Package, packageName string, filePath string) (*whisk.Package, error) {
+func (dm *YAMLParser) ComposePackage(pkg Package, packageName string, filePath string, ma whisk.KeyValue) (*whisk.Package, error) {
var errorParser error
pag := &whisk.Package{}
pag.Name = packageName
@@ -290,18 +290,23 @@ func (dm *YAMLParser) ComposePackage(pkg Package, packageName string, filePath s
pag.Annotations = append(pag.Annotations, listOfAnnotations...)
}
+ // add Managed Annotations if this is Managed Deployment
+ if utils.Flags.Managed {
+ pag.Annotations = append(pag.Annotations, ma)
+ }
+
return pag, nil
}
-func (dm *YAMLParser) ComposeSequencesFromAllPackages(namespace string, mani *YAML) ([]utils.ActionRecord, error) {
+func (dm *YAMLParser) ComposeSequencesFromAllPackages(namespace string, mani *YAML, ma whisk.KeyValue) ([]utils.ActionRecord, error) {
var s1 []utils.ActionRecord = make([]utils.ActionRecord, 0)
manifestPackages := make(map[string]Package)
if mani.Package.Packagename != "" {
- return dm.ComposeSequences(namespace, mani.Package.Sequences, mani.Package.Packagename)
+ return dm.ComposeSequences(namespace, mani.Package.Sequences, mani.Package.Packagename, ma)
} else {
- if mani.Packages != nil {
+ if len(mani.Packages) != 0 {
manifestPackages = mani.Packages
} else {
manifestPackages = mani.GetProject().Packages
@@ -309,7 +314,7 @@ func (dm *YAMLParser) ComposeSequencesFromAllPackages(namespace string, mani *YA
}
for n, p := range manifestPackages {
- s, err := dm.ComposeSequences(namespace, p.Sequences, n)
+ s, err := dm.ComposeSequences(namespace, p.Sequences, n, ma)
if err == nil {
s1 = append(s1, s...)
} else {
@@ -319,7 +324,7 @@ func (dm *YAMLParser) ComposeSequencesFromAllPackages(namespace string, mani *YA
return s1, nil
}
-func (dm *YAMLParser) ComposeSequences(namespace string, sequences map[string]Sequence, packageName string) ([]utils.ActionRecord, error) {
+func (dm *YAMLParser) ComposeSequences(namespace string, sequences map[string]Sequence, packageName string, ma whisk.KeyValue) ([]utils.ActionRecord, error) {
var s1 []utils.ActionRecord = make([]utils.ActionRecord, 0)
for key, sequence := range sequences {
@@ -356,27 +361,32 @@ func (dm *YAMLParser) ComposeSequences(namespace string, sequences map[string]Se
wskaction.Annotations = keyValArr
}
+ // appending managed annotations if its a managed deployment
+ if utils.Flags.Managed {
+ wskaction.Annotations = append(wskaction.Annotations, ma)
+ }
+
record := utils.ActionRecord{Action: wskaction, Packagename: packageName, Filepath: key}
s1 = append(s1, record)
}
return s1, nil
}
-func (dm *YAMLParser) ComposeActionsFromAllPackages(manifest *YAML, filePath string) ([]utils.ActionRecord, error) {
+func (dm *YAMLParser) ComposeActionsFromAllPackages(manifest *YAML, filePath string, ma whisk.KeyValue) ([]utils.ActionRecord, error) {
var s1 []utils.ActionRecord = make([]utils.ActionRecord, 0)
manifestPackages := make(map[string]Package)
if manifest.Package.Packagename != "" {
- return dm.ComposeActions(filePath, manifest.Package.Actions, manifest.Package.Packagename)
+ return dm.ComposeActions(filePath, manifest.Package.Actions, manifest.Package.Packagename, ma)
} else {
- if manifest.Packages != nil {
+ if len(manifest.Packages) != 0 {
manifestPackages = manifest.Packages
} else {
manifestPackages = manifest.GetProject().Packages
}
}
for n, p := range manifestPackages {
- a, err := dm.ComposeActions(filePath, p.Actions, n)
+ a, err := dm.ComposeActions(filePath, p.Actions, n, ma)
if err == nil {
s1 = append(s1, a...)
} else {
@@ -386,7 +396,7 @@ func (dm *YAMLParser) ComposeActionsFromAllPackages(manifest *YAML, filePath str
return s1, nil
}
-func (dm *YAMLParser) ComposeActions(filePath string, actions map[string]Action, packageName string) ([]utils.ActionRecord, error) {
+func (dm *YAMLParser) ComposeActions(filePath string, actions map[string]Action, packageName string, ma whisk.KeyValue) ([]utils.ActionRecord, error) {
var errorParser error
var s1 []utils.ActionRecord = make([]utils.ActionRecord, 0)
@@ -546,6 +556,10 @@ func (dm *YAMLParser) ComposeActions(filePath string, actions map[string]Action,
if len(listOfAnnotations) > 0 {
wskaction.Annotations = append(wskaction.Annotations, listOfAnnotations...)
}
+ // add managed annotations if its marked as managed deployment
+ if utils.Flags.Managed {
+ wskaction.Annotations = append(wskaction.Annotations, ma)
+ }
/*
* Web Export
@@ -603,21 +617,21 @@ func (dm *YAMLParser) ComposeActions(filePath string, actions map[string]Action,
}
-func (dm *YAMLParser) ComposeTriggersFromAllPackages(manifest *YAML, filePath string) ([]*whisk.Trigger, error) {
+func (dm *YAMLParser) ComposeTriggersFromAllPackages(manifest *YAML, filePath string, ma whisk.KeyValue) ([]*whisk.Trigger, error) {
var triggers []*whisk.Trigger = make([]*whisk.Trigger, 0)
manifestPackages := make(map[string]Package)
if manifest.Package.Packagename != "" {
- return dm.ComposeTriggers(filePath, manifest.Package)
+ return dm.ComposeTriggers(filePath, manifest.Package, ma)
} else {
- if manifest.Packages != nil {
+ if len(manifest.Packages) != 0 {
manifestPackages = manifest.Packages
} else {
manifestPackages = manifest.GetProject().Packages
}
}
for _, p := range manifestPackages {
- t, err := dm.ComposeTriggers(filePath, p)
+ t, err := dm.ComposeTriggers(filePath, p, ma)
if err == nil {
triggers = append(triggers, t...)
} else {
@@ -627,7 +641,7 @@ func (dm *YAMLParser) ComposeTriggersFromAllPackages(manifest *YAML, filePath st
return triggers, nil
}
-func (dm *YAMLParser) ComposeTriggers(filePath string, pkg Package) ([]*whisk.Trigger, error) {
+func (dm *YAMLParser) ComposeTriggers(filePath string, pkg Package, ma whisk.KeyValue) ([]*whisk.Trigger, error) {
var errorParser error
var t1 []*whisk.Trigger = make([]*whisk.Trigger, 0)
@@ -690,6 +704,11 @@ func (dm *YAMLParser) ComposeTriggers(filePath string, pkg Package) ([]*whisk.Tr
wsktrigger.Annotations = append(wsktrigger.Annotations, listOfAnnotations...)
}
+ // add managed annotations if its a managed deployment
+ if utils.Flags.Managed {
+ wsktrigger.Annotations = append(wsktrigger.Annotations, ma)
+ }
+
t1 = append(t1, wsktrigger)
}
return t1, nil
@@ -702,7 +721,7 @@ func (dm *YAMLParser) ComposeRulesFromAllPackages(manifest *YAML) ([]*whisk.Rule
if manifest.Package.Packagename != "" {
return dm.ComposeRules(manifest.Package, manifest.Package.Packagename)
} else {
- if manifest.Packages != nil {
+ if len(manifest.Packages) != 0 {
manifestPackages = manifest.Packages
} else {
manifestPackages = manifest.GetProject().Packages
@@ -743,7 +762,7 @@ func (dm *YAMLParser) ComposeApiRecordsFromAllPackages(manifest *YAML) ([]*whisk
if manifest.Package.Packagename != "" {
return dm.ComposeApiRecords(manifest.Package)
} else {
- if manifest.Packages != nil {
+ if len(manifest.Packages) != 0 {
manifestPackages = manifest.Packages
} else {
manifestPackages = manifest.GetProject().Packages
diff --git a/parsers/manifest_parser_test.go b/parsers/manifest_parser_test.go
index 19ebc07..8db6056 100644
--- a/parsers/manifest_parser_test.go
+++ b/parsers/manifest_parser_test.go
@@ -30,6 +30,7 @@ import (
"reflect"
"strconv"
"strings"
+ "github.com/apache/incubator-openwhisk-client-go/whisk"
)
// Test 1: validate manifest_parser:Unmarshal() method with a sample manifest in NodeJS
@@ -474,7 +475,7 @@ func TestComposeActionsForImplicitRuntimes(t *testing.T) {
// read and parse manifest.yaml file
p := NewYAMLParser()
m, _ := p.ParseManifest(tmpfile.Name())
- actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name())
+ actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name(), whisk.KeyValue{})
var expectedResult string
if err == nil {
for i := 0; i < len(actions); i++ {
@@ -516,7 +517,7 @@ func TestComposeActionsForInvalidRuntime(t *testing.T) {
// read and parse manifest.yaml file
p := NewYAMLParser()
m, _ := p.ParseManifest(tmpfile.Name())
- _, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name())
+ _, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name(), whisk.KeyValue{})
// (TODO) uncomment the following test case after issue #307 is fixed
// (TODO) its failing right now as we are lacking check on invalid runtime
// TODO() https://github.com/apache/incubator-openwhisk-wskdeploy/issues/608
@@ -541,7 +542,7 @@ func TestComposeActionsForSingleLineParams(t *testing.T) {
assert.Fail(t, "Failed to parse manifest: " + manifestFile )
}
- actions, err := p.ComposeActionsFromAllPackages(m, manifestFile)
+ actions, err := p.ComposeActionsFromAllPackages(m, manifestFile, whisk.KeyValue{})
if err == nil {
// assert that the actions variable has only one action
@@ -700,7 +701,7 @@ func TestComposeActionsForMultiLineParams(t *testing.T) {
assert.Fail(t, "Failed to parse manifest: " + manifestFile )
}
- actions, err := p.ComposeActionsFromAllPackages(m, manifestFile)
+ actions, err := p.ComposeActionsFromAllPackages(m, manifestFile, whisk.KeyValue{})
if err == nil {
// assert that the actions variable has only one action
@@ -780,7 +781,7 @@ func TestComposeActionsForFunction(t *testing.T) {
// read and parse manifest.yaml file
p := NewYAMLParser()
m, _ := p.ParseManifest(tmpfile.Name())
- actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name())
+ actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name(), whisk.KeyValue{})
var expectedResult, actualResult string
if err == nil {
for i := 0; i < len(actions); i++ {
@@ -830,7 +831,7 @@ func TestComposeActionsForLimits (t *testing.T) {
// read and parse manifest.yaml file
p := NewYAMLParser()
m, _ := p.ParseManifest(tmpfile.Name())
- actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name())
+ actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name(), whisk.KeyValue{})
//var expectedResult, actualResult string
if err == nil {
for i:=0; i<len(actions); i++ {
@@ -867,7 +868,7 @@ func TestComposeActionsForWebActions(t *testing.T) {
// read and parse manifest.yaml file
p := NewYAMLParser()
m, _ := p.ParseManifest(tmpfile.Name())
- actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name())
+ actions, err := p.ComposeActionsFromAllPackages(m, tmpfile.Name(), whisk.KeyValue{})
if err == nil {
for i := 0; i < len(actions); i++ {
if actions[i].Action.Name == "hello" {
@@ -1061,7 +1062,7 @@ func TestComposePackage(t *testing.T) {
// read and parse manifest.yaml file
p := NewYAMLParser()
m, _ := p.ParseManifest(tmpfile.Name())
- pkg, err := p.ComposeAllPackages(m, tmpfile.Name())
+ pkg, err := p.ComposeAllPackages(m, tmpfile.Name(), whisk.KeyValue{})
if err == nil {
n := "helloworld"
assert.NotNil(t, pkg[n], "Failed to get the whole package")
@@ -1091,7 +1092,7 @@ func TestComposeSequences(t *testing.T) {
// read and parse manifest.yaml file
p := NewYAMLParser()
m, _ := p.ParseManifest(tmpfile.Name())
- seqList, err := p.ComposeSequencesFromAllPackages("", m)
+ seqList, err := p.ComposeSequencesFromAllPackages("", m, whisk.KeyValue{})
if err != nil {
assert.Fail(t, "Failed to compose sequences")
}
@@ -1123,7 +1124,7 @@ func TestComposeTriggers(t *testing.T) {
assert.Fail(t, "Failed to parse manifest: " + manifestFile )
}
- triggerList, err := p.ComposeTriggersFromAllPackages(m, manifestFile)
+ triggerList, err := p.ComposeTriggersFromAllPackages(m, manifestFile, whisk.KeyValue{})
if err != nil {
assert.Fail(t, "Failed to compose trigger")
}
diff --git a/tests/src/integration/alarmtrigger/deployment.yaml b/tests/src/integration/alarmtrigger/deployment.yaml
index 4d983e3..75e1d59 100644
--- a/tests/src/integration/alarmtrigger/deployment.yaml
+++ b/tests/src/integration/alarmtrigger/deployment.yaml
@@ -1,13 +1,13 @@
project:
name: HelloWorldEvery12Hours
packages:
- helloworld:
- actions:
- helloworld:
- inputs:
- name: Amy
- place: Paris
- triggers:
- Every12Hours:
- inputs:
- cron: "0 */12 * * *"
+ helloworld:
+ actions:
+ helloworld:
+ inputs:
+ name: Amy
+ place: Paris
+ triggers:
+ Every12Hours:
+ inputs:
+ cron: "0 */12 * * *"
\ No newline at end of file
diff --git a/tests/src/integration/alarmtrigger/manifest.yaml b/tests/src/integration/alarmtrigger/manifest.yaml
index eef0b7c..d322c48 100644
--- a/tests/src/integration/alarmtrigger/manifest.yaml
+++ b/tests/src/integration/alarmtrigger/manifest.yaml
@@ -21,4 +21,4 @@ packages:
rules:
helloworldEvery12Hours:
action: helloworld
- trigger: Every12Hours
+ trigger: Every12Hours
\ No newline at end of file
diff --git a/tests/src/integration/common/wskdeploy.go b/tests/src/integration/common/wskdeploy.go
index 9f6aa5c..3b1fb00 100644
--- a/tests/src/integration/common/wskdeploy.go
+++ b/tests/src/integration/common/wskdeploy.go
@@ -169,6 +169,10 @@ func (wskdeploy *Wskdeploy) UndeployManifestPathOnly(manifestpath string) (strin
return wskdeploy.RunCommand("undeploy", "-m", manifestpath)
}
+func (Wskdeploy *Wskdeploy) ManagedDeployment(manifestPath string, deploymentPath string) (string, error) {
+ return Wskdeploy.RunCommand("-m", manifestPath, "-d", deploymentPath, "--managed")
+}
+
// This method is only for testing
// This method will mock a construction of deployment plan, creating all the memory objects
// This method CANNOT be used for real deployment!
diff --git a/tests/src/integration/managed-deployment/00-manifest-minus-second-package.yaml b/tests/src/integration/managed-deployment/00-manifest-minus-second-package.yaml
new file mode 100644
index 0000000..4d69c70
--- /dev/null
+++ b/tests/src/integration/managed-deployment/00-manifest-minus-second-package.yaml
@@ -0,0 +1,60 @@
+project:
+ name: MyFirstManagedProject
+ packages:
+ ManagedPackage-1:
+ actions:
+ HelloWorld-1:
+ 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!
+ HelloWorld-2:
+ 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!
+ HelloWorld-3:
+ 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!
+ sequences:
+ ManagedSequence-1:
+ actions: HelloWorld-1, HelloWorld-2, HelloWorld-3
+ ManagedSequence-2:
+ actions: HelloWorld-1, HelloWorld-2, HelloWorld-3
+ triggers:
+ ManagedTrigger-1:
+ rules:
+ ManagedRule-1:
+ action: ManagedSequence-1
+ trigger: ManagedTrigger-1
+
+
diff --git a/tests/src/integration/managed-deployment/01-manifest-minus-sequence-2.yaml b/tests/src/integration/managed-deployment/01-manifest-minus-sequence-2.yaml
new file mode 100644
index 0000000..eea15e2
--- /dev/null
+++ b/tests/src/integration/managed-deployment/01-manifest-minus-sequence-2.yaml
@@ -0,0 +1,57 @@
+project:
+ name: MyFirstManagedProject
+ packages:
+ ManagedPackage-1:
+ actions:
+ HelloWorld-1:
+ 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!
+ HelloWorld-2:
+ 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!
+ HelloWorld-3:
+ 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!
+ sequences:
+ ManagedSequence-1:
+ actions: HelloWorld-1, HelloWorld-2, HelloWorld-3
+ triggers:
+ ManagedTrigger-1:
+ rules:
+ ManagedRule-1:
+ action: ManagedSequence-1
+ trigger: ManagedTrigger-1
+
diff --git a/tests/src/integration/managed-deployment/02-manifest-minus-action-3.yaml b/tests/src/integration/managed-deployment/02-manifest-minus-action-3.yaml
new file mode 100644
index 0000000..82d52b5
--- /dev/null
+++ b/tests/src/integration/managed-deployment/02-manifest-minus-action-3.yaml
@@ -0,0 +1,43 @@
+project:
+ name: MyFirstManagedProject
+ packages:
+ ManagedPackage-1:
+ actions:
+ HelloWorld-1:
+ 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!
+ HelloWorld-2:
+ 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!
+ sequences:
+ ManagedSequence-1:
+ actions: HelloWorld-1, HelloWorld-2
+ triggers:
+ ManagedTrigger-1:
+ rules:
+ ManagedRule-1:
+ action: ManagedSequence-1
+ trigger: ManagedTrigger-1
+
diff --git a/tests/src/integration/managed-deployment/03-manifest-minus-trigger.yaml b/tests/src/integration/managed-deployment/03-manifest-minus-trigger.yaml
new file mode 100644
index 0000000..bb496f6
--- /dev/null
+++ b/tests/src/integration/managed-deployment/03-manifest-minus-trigger.yaml
@@ -0,0 +1,37 @@
+project:
+ name: MyFirstManagedProject
+ packages:
+ ManagedPackage-1:
+ actions:
+ HelloWorld-1:
+ 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!
+ HelloWorld-2:
+ 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!
+ sequences:
+ ManagedSequence-1:
+ actions: HelloWorld-1, HelloWorld-2
+
diff --git a/tests/src/integration/managed-deployment/04-manifest-minus-package.yaml b/tests/src/integration/managed-deployment/04-manifest-minus-package.yaml
new file mode 100644
index 0000000..03f77df
--- /dev/null
+++ b/tests/src/integration/managed-deployment/04-manifest-minus-package.yaml
@@ -0,0 +1,4 @@
+project:
+ name: MyFirstManagedProject
+ packages:
+
diff --git a/tests/src/integration/managed-deployment/actions/hello.js b/tests/src/integration/managed-deployment/actions/hello.js
new file mode 100644
index 0000000..25fdafb
--- /dev/null
+++ b/tests/src/integration/managed-deployment/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/managed-deployment/managed-deployment_test.go b/tests/src/integration/managed-deployment/managed-deployment_test.go
new file mode 100644
index 0000000..10e8aa8
--- /dev/null
+++ b/tests/src/integration/managed-deployment/managed-deployment_test.go
@@ -0,0 +1,62 @@
+// +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"
+)
+
+func TestManagedDeployment(t *testing.T) {
+ path := "/src/github.com/apache/incubator-openwhisk-wskdeploy/tests/src/integration/managed-deployment/"
+ manifestPath := os.Getenv("GOPATH") + path + "manifest.yaml"
+ deploymentPath := ""
+ wskdeploy := common.NewWskdeploy()
+ _, err := wskdeploy.ManagedDeployment(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+
+ manifestPath = os.Getenv("GOPATH") + path + "00-manifest-minus-second-package.yaml"
+ wskdeploy = common.NewWskdeploy()
+ _, err = wskdeploy.ManagedDeployment(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+
+ manifestPath = os.Getenv("GOPATH") + path + "01-manifest-minus-sequence-2.yaml"
+ wskdeploy = common.NewWskdeploy()
+ _, err = wskdeploy.ManagedDeployment(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+
+ manifestPath = os.Getenv("GOPATH") + path + "02-manifest-minus-action-3.yaml"
+ wskdeploy = common.NewWskdeploy()
+ _, err = wskdeploy.ManagedDeployment(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+
+ manifestPath = os.Getenv("GOPATH") + path + "03-manifest-minus-trigger.yaml"
+ wskdeploy = common.NewWskdeploy()
+ _, err = wskdeploy.ManagedDeployment(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+
+ manifestPath = os.Getenv("GOPATH") + path + "04-manifest-minus-package.yaml"
+ wskdeploy = common.NewWskdeploy()
+ _, err = wskdeploy.ManagedDeployment(manifestPath, deploymentPath)
+ assert.Equal(t, nil, err, "Failed to deploy based on the manifest and deployment files.")
+}
+
diff --git a/tests/src/integration/managed-deployment/manifest.yaml b/tests/src/integration/managed-deployment/manifest.yaml
new file mode 100644
index 0000000..93582d1
--- /dev/null
+++ b/tests/src/integration/managed-deployment/manifest.yaml
@@ -0,0 +1,85 @@
+project:
+ name: MyFirstManagedProject
+ packages:
+ ManagedPackage-1:
+ actions:
+ HelloWorld-1:
+ 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!
+ HelloWorld-2:
+ 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!
+ HelloWorld-3:
+ 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!
+ sequences:
+ ManagedSequence-1:
+ actions: HelloWorld-1, HelloWorld-2, HelloWorld-3
+ ManagedSequence-2:
+ actions: HelloWorld-1, HelloWorld-2, HelloWorld-3
+ triggers:
+ ManagedTrigger-1:
+ rules:
+ ManagedRule-1:
+ action: ManagedSequence-1
+ trigger: ManagedTrigger-1
+ ManagedPackage-2:
+ actions:
+ HelloWorld-1:
+ 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!
+ sequences:
+ ManagedSequence-1:
+ actions: HelloWorld-1
+ triggers:
+ ManagedTrigger-2:
+ rules:
+ ManagedRule-2:
+ action: ManagedSequence-1
+ trigger: ManagedTrigger-2
+
+
diff --git a/utils/flags.go b/utils/flags.go
index 7b35856..2a31256 100644
--- a/utils/flags.go
+++ b/utils/flags.go
@@ -35,6 +35,7 @@ var Flags struct {
Strict bool // strict flag to support user defined runtime version.
Key string
Cert string
+ Managed bool // OpenWhisk Managed Deployments
//action flag definition
//from go cli
diff --git a/utils/managedannotations.go b/utils/managedannotations.go
new file mode 100644
index 0000000..f550193
--- /dev/null
+++ b/utils/managedannotations.go
@@ -0,0 +1,113 @@
+/*
+ * 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 utils
+
+import (
+ "crypto/sha1"
+ "encoding/json"
+ "fmt"
+ "os"
+ "github.com/apache/incubator-openwhisk-client-go/whisk"
+)
+
+/*
+ * The whole purpose of this utility is to create a managed annotation for managed deployment.
+ * Every OpenWhisk entity in the manifest file will be annotated with:
+ * managed:
+ * __OW__PROJECT__NAME: MyProject
+ * __OW__PROJECT_HASH: SHA1("OpenWhisk " + <size_of_manifest_file> + "\0" + <contents_of_manifest_file>)
+ * __OW__FILE: Absolute path of manifest file on file system
+*/
+
+const (
+ MANAGED = "managed"
+ OPENWHISK = "OpenWhisk"
+ NULL = "golang\000"
+ OW_PROJECT_NAME = "__OW_PROJECT_NAME"
+ OW_PROJECT_HASH = "__OW_PROJECT_HASH"
+
+)
+
+type ManagedAnnotation struct {
+ ProjectName string `json:"__OW_PROJECT_NAME"`
+ ProjectHash string `json:"__OW_PROJECT_HASH"`
+ File string `json:"__OW_FILE"`
+}
+
+// Project Hash is generated based on the following formula:
+// SHA1("OpenWhisk " + <size_of_manifest_file> + "\0" + <contents_of_manifest_file>)
+// Where the text OpenWhisk is a constant prefix
+// \0 is also constant and is the NULL character
+// The <size_of_manifest_file> and <contents_of_manifest_file> vary depending on the manifest file
+func generateProjectHash(filePath string) (string, error) {
+ projectHash := ""
+ // open file to read manifest file and find its size
+ file, err := os.Open(filePath)
+ defer file.Close()
+ if err != nil {
+ return projectHash, err
+ }
+
+ // run stat on the manifest file to get its size
+ f, err := file.Stat()
+ if err != nil {
+ return projectHash, err
+ }
+ size := f.Size()
+
+ // read the file contents
+ contents := make([]byte, size)
+ _, err = file.Read(contents)
+ if err != nil {
+ return projectHash, err
+ }
+
+ // combine all the hash components used to generate SHA1
+ hashContents := OPENWHISK + string(size) + NULL + string(contents)
+
+ // generate a new hash.Hash computing the SHA1 checksum
+ h := sha1.New()
+ h.Write([]byte(hashContents))
+ // Sum returns the SHA-1 checksum of the data
+ hash := h.Sum(nil)
+ // return SHA-1 checksum in hex format
+ projectHash = fmt.Sprintf("%x", hash)
+
+ return projectHash, nil
+}
+
+func GenerateManagedAnnotation(projectName string, filePath string) (whisk.KeyValue, error) {
+ projectHash, err := generateProjectHash(filePath)
+ managedAnnotation := whisk.KeyValue{}
+ if err != nil {
+ return managedAnnotation, err
+ }
+ m := ManagedAnnotation{
+ ProjectName: projectName,
+ ProjectHash: projectHash,
+ File: filePath,
+ }
+ ma, err := json.Marshal(m)
+ if err != nil {
+ return managedAnnotation, err
+ }
+ var a interface{}
+ err = json.Unmarshal(ma, &a)
+ managedAnnotation = whisk.KeyValue{Key:MANAGED, Value:a.(map[string]interface{})}
+ return managedAnnotation, nil
+}
diff --git a/wski18n/i18n_resources.go b/wski18n/i18n_resources.go
index d60b414..53ecfca 100644
--- a/wski18n/i18n_resources.go
+++ b/wski18n/i18n_resources.go
@@ -109,12 +109,12 @@ func wski18nResourcesDe_deAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/de_DE.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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\x4d\x6f\xdb\x38\x10\xbd\xe7\x57\x0c\x72\xf1\x25\xd0\xb6\x5d\x2c\xb0\xe8\x2d\xd8\x7e\x05\x6d\x93\x20\xc9\xb6\x28\xba\x05\xc2\x88\x63\x8b\x35\x45\x0a\x24\xe5\xc0\x15\xfc\xdf\x17\x14\x25\xdb\x49\x24\x8a\x92\x65\x6f\x51\x6c\x4f\x8e\xad\x79\xef\xcd\x90\x1c\xce\x50\xec\xd7\x23\x80\xe2\x08\x00\xe0\x98\xd1\xe3\x97\x70\xfc\x0e\x39\x97\xc7\x27\xee\x2b\xa3\x88\xd0\x9c\x18\x26\x85\xfd\xed\x54\xc0\xe9\xe5\x19\x24\x52\x1b\x48\x73\x6d\xe0\x0e\x21\x53\x72\xc1\x28\xd2\xe8\xf8\x08\x60\x75\xf2\x18\xee\x23\xd3\x9a\x89\x19\xc4\x29\x85\x39\x2e\x5b\x80\xeb\xa7\x26\x71\x4a\x27\xc0\x44\x96\x9b\xf2\xe9\x46\x48\x92\x9b\x44\x2a\xf6\xa3\xb4\x86\xdb\xf7\xaf\xbf\xdc\xb6\xc0\x36\x3d\xd9\x08\x79\x9f\x30\x3d\x2f\x7d\xbb\x7d\x77\x71\x7d\xd3\x86\xf7\xe4\xb1\x46\x30\x41\x52\xd4\x19\x89\xb1\x05\x65\xf3\x7b\x97\x96\x4f\xaf\xaf\xae\xcf\x2e\xce\x03\xe4\xac\x9f\x6c\x1e\x04\x22\xd8\x14\xb5\x81\x29\xe3\x08\x42\x1a\x98\xca\x5c\x50\x20\x06\x32\x62\x12\x28\x8a\x28\x53\xf2\x3b\xc6\xe6\x92\x98\x64\xb5\x8a\xfe\x11\x6d\x03\x35\x00\xc9\x3b\x2f\x8a\x22\x5a\x92\x94\xaf\x56\xbf\xd9\x4f\xf6\x43\x09\x1d\xc1\x88\x9a\xf7\x41\x15\x10\x67\xa6\x1f\x62\x99\x04\x1d\xde\xd7\xa2\x88\xec\x13\x0e\xed\x5b\x68\xb4\xfb\xe0\x35\xca\xfb\xbb\x0e\x43\x5a\xe1\x3a\x03\x98\x4a\x05\x14\x33\x2e\x97\x29\x0a\xd3\x2e\x27\xdc\xbe\x37\x7d\x2e\x76\x15\xf0\x18\xa1\x51\x82\x0d\x99\xca\x85\x61\xe9\x3a\x9c\x3a\xcf\x32\xa9\x0c\x52\xb8\x5b\xc2\x45\x86\xc2\xad\xaa\x8c\x13\x33\x95\x2a\x6d\x17\x33\x0c\xab\x79\xc9\xeb\xb9\x13\x0f\x09\xd1\x10\x27\x52\xa3\x00\x02\x19\x51\x86\xc5\x39\x27\x6a\x4d\x64\x3d\xb5\xc4\x24\xb6\x32\xda\xc5\xed\x82\xd8\x3c\x78\x62\xe3\x5c\x6d\x6a\x96\x19\x9e\x80\x46\x03\x46\x82\x90\x14\xbf\xeb\xb6\x81\x0b\xb4\x6e\xa4\xbe\xb1\xea\x72\x93\xa0\x30\x2c\x76\xa9\x7c\x8e\xcb\x3a\xe6\xb1\x14\x53\x36\xcb\x15\xd2\xf6\x68\xf4\x41\x68\x95\xb0\xde\xf9\x7a\x12\xfb\xed\x5a\xe9\xd6\xbb\x44\x5f\xbe\x0e\xc3\x20\xff\x8a\x22\x22\x19\xb3\x7f\xad\x56\x27\x30\x55\x32\xad\xbe\xd2\x32\x57\x31\xfa\xb2\xed\x20\x28\xef\xb8\xd7\x63\xa5\xd1\x6c\x01\xe4\x26\x09\x13\x13\x0c\x11\x36\x14\x45\x11\xad\xff\xde\xf6\x68\xfd\x65\x98\xaa\xe1\x98\x8d\x32\xdf\x10\xc6\x91\xda\x95\x34\x43\xb7\x33\x3c\x59\x70\xda\xc1\xda\xb4\xf4\xb9\x4c\x4b\x1a\xd5\x82\xc5\xf8\xd2\x32\xa1\x52\x3e\xc5\xa3\xc1\x37\x8a\xbf\x36\x44\x95\x59\x20\x17\x29\x51\x3a\x21\x7c\x2b\x79\x32\x31\x95\x0e\x9a\xcb\x98\x70\x58\x10\x9e\xa3\x6e\x97\x3a\x10\xac\x25\xe9\xf9\x20\x98\x30\xa8\x04\xfa\xf6\xab\x60\xfb\x46\xfa\x57\xeb\x0d\x0d\x62\x99\x66\x1c\x6d\xb8\x75\x1e\xc7\xa8\xf5\x34\xe7\x7c\xd9\xce\x1c\x64\xda\x48\xfa\x56\x1a\x40\xa5\xa4\x82\x58\x21\x31\x76\xc3\xcd\x48\x3c\x27\x33\x84\x7b\x66\x92\xea\xb7\x14\xb5\x26\xb3\xad\xc1\x05\x22\x68\x6d\x27\xa9\xfb\xc1\x7e\xf0\xcd\xaa\xbd\x50\x85\x3a\xe5\xf6\xbb\x5f\xcc\xa7\x8c\x1d\xc2\xa1\xdd\x68\x42\x9d\x51\x39\x3f\xc8\x94\xdb\x91\xa7\xc3\x1d\x8d\xa6\x64\x29\x73\xa6\x21\x26\xd7\x20\xa7\xfb\xf6\x6d\x2f\xa4\xa1\xe3\x66\x14\x9b\xcd\x50\x1d\x62\xe8\x76\xa7\xea\xeb\xd4\x14\x91\x1e\xd2\xb3\x1d\xf9\xfa\x66\xf8\x3b\x26\xa8\xfd\xfb\x80\x59\x71\x77\xca\xae\xbd\x53\x4e\x6d\x77\x8a\x82\xa2\x88\x97\xd6\x94\x62\x76\x4e\x52\x5c\xad\x80\x32\x5a\x95\xc8\x6e\x8f\xb4\x5b\xe4\x7a\x87\x84\xab\x5c\xc0\xed\xa6\x93\xaa\x3b\xcc\x5b\x5b\x5d\x28\x4c\xe5\x02\x5d\x43\x45\x38\x5f\x56\x0d\x30\x52\x20\x5a\xa3\xf1\x14\x28\x3f\x83\x32\x4f\xc8\xb6\xf6\xc6\xa2\x88\x64\x6e\xb2\xdc\xac\x56\x10\x45\x91\xd7\x1f\x8f\x59\x07\x59\x99\x96\xfa\x52\x35\x1a\x75\x10\x3d\x58\x53\x7d\x09\xbd\xc6\x1d\xc4\xf5\x54\xef\xcb\xd9\x66\x17\x48\x57\xaf\xac\xa1\xb4\x6d\xf6\x1d\xf4\x0f\x67\x74\x2f\x66\x8f\x69\x23\xe9\xc5\xfb\x08\xfe\x22\x22\x46\xce\x2b\xf3\xce\x23\x24\xaf\x49\x07\x89\x35\x08\x3b\xa8\xf2\xdb\xb4\xf4\x1a\x9b\x87\xfc\xab\xdf\xd3\x6e\xf4\x80\xe8\xca\x9a\x2e\x8d\x0c\xe8\x37\xda\x0c\x7f\x5e\xaf\x6b\x84\xa7\x53\x70\x93\x8f\xdb\xa7\x6f\xa8\x75\xb7\xff\x43\xb7\x83\xb0\xd0\xec\x80\xde\x51\x46\x50\xe4\x78\x98\x9e\x6a\x3c\xa6\x50\x97\xf6\x5c\xa9\x8f\xc5\xf3\x7f\x17\xf2\x28\x9e\xfb\xef\x42\x46\xa4\xea\xeb\xd4\x9e\xbb\x90\xb1\xf9\x42\xdd\xdb\xff\x39\xd3\x88\x54\x8d\x4e\x7d\x3e\xbd\x3a\x3f\x3b\x7f\xfb\x12\x6e\x12\x84\x89\x3b\xb5\x9d\xc0\x97\xd3\x8f\x1f\xdc\x09\xb4\x58\x87\x14\x85\x61\xa6\x3c\x93\xa6\x98\x29\x8c\x89\x41\x1a\xc1\x25\x47\xa2\x11\x72\x8d\x30\xb1\x41\x9f\x00\x13\xda\x20\xb1\xb5\x3b\x50\xd4\xb1\x62\x77\x48\x2d\x8e\xce\x30\x66\xd3\xea\x6d\x86\xa7\xdb\xf8\x2f\x15\x85\x8e\x7b\x5d\x68\x1e\x70\xfc\xc7\xa3\x6c\xab\xa3\x9a\x0a\xd9\x84\x68\xb8\x43\x14\x0f\x6a\xa3\x75\x7f\xe6\xad\xae\x86\xc1\x35\x8a\xbb\xf4\xd4\xf7\x43\x15\xee\x86\xe9\x95\x39\xa6\xbc\x11\x64\xdd\x54\xcb\x65\x0c\x59\xc3\xb0\xbc\xb2\x9e\xf4\xa7\xbb\x6a\x1b\x00\xd8\x28\xf0\xea\x71\xc7\x3e\x54\xd8\x00\xa0\x46\x41\xa7\x4f\x4f\x2b\x86\x4a\x1a\x04\x15\x90\x38\x36\x15\x7a\x33\x5c\xdd\x58\x86\xe7\x8e\x7e\x88\x5d\x0b\xa0\xda\x3a\xb6\xd1\xaa\xee\x2f\x68\xce\xfb\xcd\xbd\xb3\xc8\x56\x91\xbd\x68\x03\x0c\x3b\x66\x89\x6b\x39\x7a\x91\x06\x1a\x77\xbc\xd1\x65\x62\x21\xe7\x58\x96\xd1\xae\x10\x4b\x50\x1c\xa8\x26\x3c\xb0\x08\x7f\x4d\xf5\x91\x08\x4a\x8c\x54\x4b\x98\x32\xe4\x14\xea\xa4\xfe\x09\x95\xb6\x61\xae\x6f\x24\x6a\xdf\x2b\xd9\xa1\x68\x7e\x69\x8f\x8d\xeb\xfb\x40\x64\xe1\x6a\x23\x1b\xb6\x38\x57\xca\xf6\xe1\x9b\x63\xdb\x85\x7b\x3a\x40\xec\xce\xf8\xc3\x22\xfb\x81\xc5\x28\x34\x8e\x14\xd9\x16\xb4\xb0\xc8\xd6\xc6\xfb\x8a\xec\x60\x7c\xbf\xfc\x1a\xb6\x28\x22\xee\x3e\x9e\xbd\x5a\xad\x6a\x16\x02\x0b\xc2\x19\x05\x29\x30\x40\x6a\x2f\xac\x46\x59\x29\xa6\x52\x2d\xaf\xd9\x0f\xb4\x9d\x38\x67\x29\x33\xda\x3a\x59\x5f\xa7\x03\x9d\xc8\x9c\x53\x3b\x38\x44\x94\xf7\x13\xec\xa2\xbe\x43\x73\x6f\x33\xd6\xf3\x17\x7f\x96\xcb\xf7\x8f\xe7\x2f\xda\xd5\x8e\x4a\xd1\x7c\x87\x8f\xa5\x28\x73\x33\x08\xfe\xd9\xb3\x12\xfe\xf7\x67\xf6\x9f\xe7\x6a\xdf\x98\x14\x8d\x4e\x70\x39\x1b\x1a\x23\x87\xff\xdc\x23\x7f\x24\x70\xff\xcc\x3e\x13\x6e\xbe\x95\x0c\xee\x4e\xdd\xa4\x8a\xdb\xc4\x32\x57\x27\x74\xdb\xcc\x4c\x03\x9b\x09\xa9\xb6\xfa\xca\x38\xc1\x78\xee\x36\x84\x90\x26\x76\x3f\xa4\xfd\x1d\xdd\xcc\xf2\xc3\xfa\x3a\x0a\x6f\x7f\x77\xab\x09\x75\x58\x5f\x77\x27\xed\x4a\xcd\xe5\xd2\x70\xe9\x34\x65\x46\xb8\xba\x78\x7d\x6b\x32\x21\x62\x46\xee\x38\x02\xd1\xee\x86\xea\xfd\x09\xdc\x27\x2c\x4e\xe0\x9e\x71\x6e\xd7\x4f\xcd\x1f\x92\xba\x47\xe4\x6a\x74\xab\xbc\x08\x2e\xa7\xe5\x7e\x15\xcd\x71\x59\x5e\x19\x6f\x91\xd5\xfc\x6c\x37\x6c\x8c\xca\x04\xe3\x6e\x1e\xf6\xde\xab\xac\x9f\x27\x59\xc6\xeb\xbb\xb9\xe5\xfd\xd0\xb2\x4f\x71\xaf\x95\xec\x26\x27\xb6\x5e\xd5\xb9\xeb\xf0\xc4\x94\x17\xdf\x37\x5f\xbf\x61\xb6\xb4\xff\x06\x54\xa2\x0b\x6b\x4a\x4c\x9c\x94\xe8\xdd\x4c\xf5\x55\xfb\x95\x23\x4b\x1f\xdc\xbc\xaf\xa8\xea\x2f\x2b\xa2\xb6\x17\x42\xbf\x84\x6b\xfe\xb5\xb3\x4d\xd4\xa0\xbf\x9c\xb4\x5a\x4a\x61\x67\xee\xe6\x34\xf1\x04\xb2\xcd\x69\x62\xf5\x3f\x2a\xea\xe3\xc4\x80\x45\xb4\x1f\xd2\x5e\x8e\x3e\x8c\xdd\x41\xdc\x1c\x85\xd2\x3a\x79\x74\xf4\xed\xe8\xdf\x00\x00\x00\xff\xff\xd4\x73\xd6\x86\xee\x35\x00\x00")
+var _wski18nResourcesEn_usAllJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x4d\x6f\xdb\x38\x13\xbe\xe7\x57\x0c\x72\xf1\x25\xd0\xdb\xf6\xc5\x02\x8b\xde\x82\xed\x57\xd0\x36\x09\x92\x6c\x8b\xa2\x5b\x20\xb4\x38\xb6\x58\x53\xa4\x40\x52\x0e\x5c\xc3\xff\x7d\x41\x51\xb2\x9d\x44\xa2\x28\x59\x76\x82\x62\x73\x72\x64\xce\xf3\x3c\x33\xfc\x1c\x6a\xfc\xfd\x08\x60\x79\x04\x00\x70\xcc\xe8\xf1\x6b\x38\xfe\x80\x9c\xcb\xe3\x13\xf7\xc8\x28\x22\x34\x27\x86\x49\x61\xbf\x3b\x15\x70\x7a\x79\x06\x89\xd4\x06\xd2\x5c\x1b\x18\x23\x64\x4a\xce\x19\x45\x1a\x1d\x1f\x01\xac\x4e\x1e\xc2\x7d\x66\x5a\x33\x31\x85\x38\xa5\x30\xc3\x45\x03\x70\xd5\x6a\x14\xa7\x74\x04\x4c\x64\xb9\x29\x5a\xd7\x42\x92\xdc\x24\x52\xb1\x5f\x85\x35\xdc\x7e\x7c\xfb\xed\xb6\x01\xb6\xae\x65\x2d\xe4\x5d\xc2\xf4\xac\xf0\xed\xf6\xc3\xc5\xf5\x4d\x13\xde\xa3\x66\xb5\x60\x82\xa4\xa8\x33\x12\x63\x03\xca\xe6\xfb\x36\x2d\x5f\xde\x5e\x5d\x9f\x5d\x9c\x07\xc8\x59\xb7\xac\xef\x04\x22\xd8\x04\xb5\x81\x09\xe3\x08\x42\x1a\x98\xc8\x5c\x50\x20\x06\x32\x62\x12\x58\x2e\xa3\x4c\xc9\x9f\x18\x9b\x4b\x62\x92\xd5\x2a\xfa\x47\x34\x75\x54\x0f\x24\xef\xb8\x58\x2e\xa3\x05\x49\xf9\x6a\xf5\x3f\xfb\xc9\x7e\x28\xa0\x23\x18\x50\xf3\x3e\xa8\x02\xe2\xcc\xf4\x7d\x2c\x93\xa0\xc3\xfb\xbe\x5c\x46\xb6\x85\x43\xfb\x11\x1a\xed\x2e\x78\xb5\xf2\xfe\xae\xc2\x90\x96\xb8\xce\x00\x26\x52\x01\xc5\x8c\xcb\x45\x8a\xc2\x34\xcb\x09\xb7\xef\x4c\x9f\x8b\x5d\x05\x3c\x44\xa8\x95\x60\x43\xa6\x72\x61\x58\xba\x0e\xa7\xce\xb3\x4c\x2a\x83\x14\xc6\x0b\xb8\xc8\x50\xb8\x59\x95\x71\x62\x26\x52\xa5\xcd\x62\xfa\x61\xd5\x4f\x79\x3d\x73\xe2\x21\x21\x1a\xe2\x44\x6a\x14\x40\x20\x23\xca\xb0\x38\xe7\x44\xad\x89\xac\xa7\x96\x98\xc4\x56\x46\xb3\xb8\x5d\x10\xeb\x3b\x4f\x6c\x9c\xab\x4c\xcd\x22\xc3\x13\xd0\x68\xc0\x48\x10\x92\xe2\x4f\xdd\xd4\x71\x81\xd6\xb5\xd4\x37\x56\x5d\x6e\x12\x14\x86\xc5\x6e\x29\x9f\xe1\xa2\x8a\x79\x2c\xc5\x84\x4d\x73\x85\xb4\x39\x1a\x5d\x10\x1a\x25\xac\x77\xbe\x8e\xc4\x7e\xbb\x46\xba\xf5\x2e\xd1\x95\xaf\xc5\x30\xc8\xbf\xe5\x32\x22\x19\xb3\xff\xad\x56\x27\x30\x51\x32\x2d\x1f\x69\x99\xab\x18\x7d\xab\x6d\x2f\x28\x6f\xbf\x57\x7d\xa5\xd1\x6c\x01\xe4\x26\x09\x13\x13\x0c\x11\xd6\x15\xcb\x65\xb4\xfe\x7f\xdb\xa3\xf5\xc3\x30\x55\xfd\x31\x6b\x65\xbe\x23\x8c\x23\xb5\x33\x69\x8a\x6e\x67\x78\x34\xe1\xb4\x83\xb5\xcb\xd2\xd7\x62\x59\xd2\xa8\xe6\x2c\xc6\xd7\x96\x09\x95\xf2\x29\x1e\x0c\xbe\x56\xfc\xb5\x21\xaa\x58\x05\x72\x91\x12\xa5\x13\xc2\xb7\x16\x4f\x26\x26\xd2\x41\x73\x19\x13\x0e\x73\xc2\x73\xd4\xcd\x52\x7b\x82\x35\x2c\x7a\x3e\x08\x26\x0c\x2a\x81\xbe\xfd\x2a\xd8\xbe\x96\xfe\xcd\x7a\x43\x83\x58\xa6\x19\x47\x1b\x6e\x9d\xc7\x31\x6a\x3d\xc9\x39\x5f\x34\x33\x07\x99\xd6\x92\xbe\x97\x06\x50\x29\xa9\x20\x56\x48\x8c\xdd\x70\x33\x12\xcf\xc8\x14\xe1\x8e\x99\xa4\xfc\x2e\x45\xad\xc9\x74\xab\x73\x81\x08\x5a\xd9\x49\xea\xbe\xb0\x1f\x7c\xa3\x6a\x2f\x54\xa1\x4e\xb9\xfd\xee\x37\xf3\x29\x63\x87\x70\x68\x37\x9a\x50\x67\x54\xce\x0f\x32\xe4\x76\xe4\x69\x71\x47\xa3\x29\x58\x8a\x35\xd3\x10\x93\x6b\x90\x93\x7d\xfb\xb6\x17\xd2\xd0\x7e\x33\x8a\x4d\xa7\xa8\x0e\xd1\x75\xbb\x53\x75\x75\x6a\x82\x48\x0f\xe9\xd9\x8e\x7c\x5d\x57\xf8\x31\x13\xd4\xfe\x7f\xc0\x55\x71\x77\xca\xb6\xbd\x53\x4e\x6c\x76\x8a\x82\xa2\x88\x17\xd6\x94\x62\x76\x4e\x52\x5c\xad\x80\x32\x5a\x1e\x91\xdd\x1e\x69\xb7\xc8\xf5\x0e\x09\x57\xb9\x80\xdb\x4d\x26\x55\x65\x98\xb7\xf6\x74\xa1\x30\x95\x73\x74\x09\x15\xe1\x7c\x51\x26\xc0\x48\x81\x68\x8d\xc6\x73\x40\x79\x0e\xca\x3c\x21\xdb\xda\x1b\x97\xcb\x48\xe6\x26\xcb\xcd\x6a\x05\x51\x14\x79\xfd\xf1\x98\xb5\x90\x15\xcb\x52\x57\xaa\x5a\xa3\x16\xa2\x7b\x73\xaa\x2b\xa1\xd7\xb8\x85\xb8\x1a\xea\x5d\x39\x9b\xec\x02\xe9\xaa\x99\xd5\x97\xb6\xc9\xbe\x85\xfe\xfe\x88\xee\xc4\xec\x31\xad\x25\xbd\xf8\x18\xc1\x5f\x44\xc4\xc8\x79\x69\xde\x7a\x85\xe4\x35\x69\x21\xb1\x06\x61\x17\x55\x7e\x9b\x86\x5c\x63\xd3\xc8\x3f\xfb\x3d\xe9\x46\x07\x88\xb6\x55\xd3\x2d\x23\x3d\xf2\x8d\x26\xc3\xe7\xeb\x75\x85\xf0\x78\x08\x6e\xd6\xe3\xe6\xe1\x1b\x6a\xdd\xee\x7f\xdf\xed\x20\x2c\x34\x3b\xa0\xb7\x1c\x23\x28\x72\x3c\x4c\x4e\x35\x1c\x53\xa8\x4b\x7b\x3e\xa9\x0f\xc5\xf3\x5f\x16\xf2\x20\x9e\xfb\xcf\x42\x06\xa4\xea\xea\xd4\x9e\xb3\x90\xa1\xf9\x42\xdd\xdb\xff\x3d\xd3\x80\x54\xb5\x4e\x7d\x3d\xbd\x3a\x3f\x3b\x7f\xff\x1a\x6e\x12\x84\x91\xbb\xb5\x1d\xc1\xb7\xd3\xcf\x9f\xdc\x0d\xb4\x58\x87\x14\x85\x61\xa6\xb8\x93\xa6\x98\x29\x8c\x89\x41\x1a\xc1\x25\x47\xa2\x11\x72\x8d\x30\xb2\x41\x1f\x01\x13\xda\x20\xb1\x67\x77\xa0\xa8\x63\xc5\xc6\x48\x2d\x8e\xce\x30\x66\x93\xf2\x6d\x86\x27\xdb\x78\x4a\x45\xa1\xfd\x5e\x1d\x34\x0f\xd8\xff\xc3\x51\x36\x9d\xa3\xea\x0e\xb2\x09\xd1\x30\x46\x14\xf7\xce\x46\xeb\xfc\xcc\x7b\xba\xea\x07\x57\x2b\xee\xd2\x73\xbe\xef\xab\x70\x37\x4c\xaf\xcc\x21\xe5\x0d\x20\xeb\xa6\x9c\x2e\x43\xc8\xea\x87\xe5\x95\xf5\x28\x3f\xdd\x55\x5b\x0f\xc0\x5a\x81\x57\x0f\x33\xf6\xbe\xc2\x7a\x00\xd5\x0a\x3a\x7d\x7c\x5b\xd1\x57\x52\x2f\xa8\x80\x85\x63\x73\x42\xaf\x87\xab\x12\xcb\xf0\xb5\xa3\x1b\x62\xdb\x04\x28\xb7\x8e\x6d\xb4\x32\xfb\x0b\x1a\xf3\x7e\x73\xef\x28\xb2\xa7\xc8\x4e\xb4\x01\x86\x2d\xa3\xc4\xa5\x1c\x9d\x48\x03\x8d\x5b\xde\xe8\x32\x31\x97\x33\x2c\x8e\xd1\xee\x20\x96\xa0\x38\xd0\x99\xf0\xc0\x22\xfc\x67\xaa\xcf\x44\x50\x62\xa4\x5a\xc0\x84\x21\xa7\x50\x2d\xea\x5f\x50\x69\x1b\xe6\xaa\x22\x51\xfb\x5e\xc9\xf6\x45\xf3\x4b\x7b\x68\x5c\xd5\x03\x91\xb9\x3b\x1b\xd9\xb0\xc5\xb9\x52\x36\x0f\xdf\x5c\xdb\xce\x5d\xeb\x00\xb1\x3b\xe3\xf7\x8b\xec\x27\x16\xa3\xd0\x38\x50\x64\x1b\xd0\xc2\x22\x5b\x19\xef\x2b\xb2\xbd\xf1\xfd\xf2\x2b\xd8\xe5\x32\xe2\xee\xe3\xd9\x9b\xd5\xaa\x62\x21\x30\x27\x9c\x51\x90\x02\x03\xa4\x76\xc2\xaa\x95\x95\x62\x2a\xd5\xe2\x9a\xfd\x42\x9b\x89\x73\x96\x32\xa3\xad\x93\x55\x39\x1d\xe8\x44\xe6\x9c\xda\xce\x21\xa2\xa8\x4f\xb0\x93\x7a\x8c\xe6\xce\xae\x58\x2f\x5f\xfd\x59\x4c\xdf\x3f\x5e\xbe\x6a\x56\x3b\x28\x45\x7d\x0d\x1f\x4b\x51\xe6\xa6\x17\xfc\x8b\x17\x05\xfc\xff\x5f\xd8\x3f\x4f\x69\xdf\x90\x14\xb5\x4e\x70\x39\xed\x1b\x23\x87\xff\xd2\x23\x7f\x20\x70\xff\xc8\x3e\x13\x6e\xbc\x15\x0c\xae\xa6\x6e\x54\xc6\x6d\x64\x99\xcb\x1b\xba\x6d\x66\xa6\x81\x4d\x85\x54\x5b\x79\x65\x9c\x60\x3c\x73\x1b\x42\x48\x12\xbb\x1f\xd2\xee\x8e\x6e\x46\xf9\x61\x7d\x1d\x84\xb7\xbb\xbb\xe5\x80\x3a\xac\xaf\xbb\x93\xb6\x2d\xcd\xc5\xd4\x70\xcb\x69\xca\x8c\x70\xe7\xe2\x75\xd5\x64\x42\xc4\x94\x8c\x39\x02\xd1\xae\x42\xf5\xee\x04\xee\x12\x16\x27\x70\xc7\x38\xb7\xf3\xa7\xe2\x0f\x59\xba\x07\xe4\xaa\x75\xab\x28\x04\x97\x93\x62\xbf\x8a\x66\xb8\x28\x4a\xc6\x1b\x64\xd5\xb7\x6d\x87\x8d\x51\x99\x60\xdc\x4d\x63\x6f\x5d\x65\xd5\x9e\x64\x19\xaf\x6a\x73\x8b\xfa\xd0\x22\x4f\x71\xaf\x95\xec\x26\x27\xb6\x5e\xd5\xb9\x72\x78\x62\x8a\xc2\xf7\xcd\xe3\x77\xcc\x1e\xed\x7f\x00\x95\xe8\xc2\x9a\x12\x13\x27\x05\x7a\x3b\x53\x55\x6a\xbf\x72\x64\xe9\xbd\xca\xfb\x92\xaa\x7a\x58\x12\x35\xbd\x10\xfa\x2d\x5c\xf3\xcf\x9d\x6d\xa2\x1a\xfd\xc5\xa0\xd5\x52\x0a\x3b\x72\x37\xb7\x89\x27\x90\x6d\x6e\x13\xcb\x5f\x54\x54\xd7\x89\x01\x93\x68\x3f\xa4\x9d\x1c\xbd\x1f\xbb\x83\xb8\x39\x08\x65\xe0\xbb\x47\x57\x26\x5a\x5c\x04\x33\xd4\xde\xd7\x82\x40\x73\x65\x33\xbf\x94\x08\x32\x45\xba\xfd\x22\x7d\x4f\x75\x33\xcf\x56\x6e\x7d\xfa\x5e\xfc\x4a\x67\xf3\xc3\x8a\x7b\x97\x00\x6e\x69\x2f\x6e\xda\x9d\x0f\x45\x3d\xf0\x76\xaa\x51\xf5\xe1\xe6\xa7\x47\x75\x93\x77\x8d\x33\xc6\xed\x3a\x03\xdf\x96\xf4\xf4\xba\x5a\xc2\x65\xea\xee\x87\x9e\x45\xc0\x9e\x4e\x59\x4b\xc8\xb6\xea\x84\xca\x8f\xcf\x25\x64\x4f\xa7\xcc\x86\xec\xe8\xe8\xc7\xd1\xbf\x01\x00\x00\xff\xff\x5f\x5a\x74\xc9\xe0\x3a\x00\x00")
func wski18nResourcesEn_usAllJsonBytes() ([]byte, error) {
return bindataRead(
@@ -129,7 +129,7 @@ func wski18nResourcesEn_usAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 13806, mode: os.FileMode(420), modTime: time.Unix(1509045117, 0)}
+ info := bindataFileInfo{name: "wski18n/resources/en_US.all.json", size: 15072, mode: os.FileMode(420), modTime: time.Unix(1510298069, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -149,7 +149,7 @@ func wski18nResourcesEs_esAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/es_ES.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
@@ -169,7 +169,7 @@ func wski18nResourcesFr_frAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/fr_FR.all.json", size: 101, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
@@ -189,7 +189,7 @@ func wski18nResourcesIt_itAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/it_IT.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
@@ -209,7 +209,7 @@ func wski18nResourcesJa_jaAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/ja_JA.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
@@ -229,7 +229,7 @@ func wski18nResourcesKo_krAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/ko_KR.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
@@ -249,7 +249,7 @@ func wski18nResourcesPt_brAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/pt_BR.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
@@ -269,7 +269,7 @@ func wski18nResourcesZh_hansAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/zh_Hans.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
@@ -289,7 +289,7 @@ func wski18nResourcesZh_hantAllJson() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "wski18n/resources/zh_Hant.all.json", size: 0, mode: os.FileMode(420), modTime: time.Unix(1505354770, 0)}
+ 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
}
diff --git a/wski18n/resources/en_US.all.json b/wski18n/resources/en_US.all.json
index d23dfab..b5cf545 100644
--- a/wski18n/resources/en_US.all.json
+++ b/wski18n/resources/en_US.all.json
@@ -330,6 +330,22 @@
{
"id": "WARNING: application in manifest file will soon be deprecated, please use project instead.\n",
"translation": "WARNING: application in manifest file will soon be deprecated, please use project instead.\n"
+ },
+ {
+ "id": "Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n",
+ "translation": "Undeployment of deleted entities did not complete sucessfully during managed deployment. Run `wskdeploy undeploy` to remove partially deployed assets.\n"
+ },
+ {
+ "id": "Found the action {{.action}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
+ "translation": "Found the action {{.action}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
+ },
+ {
+ "id": "Found the trigger {{.trigger}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
+ "translation": "Found the trigger {{.trigger}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
+ },
+ {
+ "id": "Found the package {{.package}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n",
+ "translation": "Found the package {{.package}} which is deleted from the current project {{.project}} in manifest file which is being undeployed.\n"
}
]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services