summaryrefslogtreecommitdiffstats
path: root/src/ncm/internal
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-08-07 12:04:15 -0700
committerEric Multanen <eric.w.multanen@intel.com>2020-08-11 19:30:59 -0700
commit709d6d17a3b2f8bc9d46034295bd7c5a7fb76107 (patch)
treec028ad152f5cf50e4991ba1388561b2c83f1fca8 /src/ncm/internal
parente7061c31f693f0ee60040a67baaa3935c64786cb (diff)
Add appcontext state, status and resource status
Add support in the AppContext for managing an AppContext (composite app level) status value. Also adds support for tracking rsync status at the resource level. A mechanism for tracking history at the controlling resource level (i.e. DeploymentGroupIntnt or Cluster) is added, in part, so that all AppContexts associated can be deleted when the resource is eventually deleted. Issue-ID: MULTICLOUD-1042 Change-Id: I3d0a9a97ea45ca11f9f873104476e4b67521e56a Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Diffstat (limited to 'src/ncm/internal')
-rw-r--r--src/ncm/internal/ovncontroller/ovncontroller.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ncm/internal/ovncontroller/ovncontroller.go b/src/ncm/internal/ovncontroller/ovncontroller.go
index 125ad6c7..b2fcacd5 100644
--- a/src/ncm/internal/ovncontroller/ovncontroller.go
+++ b/src/ncm/internal/ovncontroller/ovncontroller.go
@@ -100,7 +100,8 @@ func Apply(ctxVal interface{}, clusterProvider, cluster string) error {
return nil
}
- clusterhandle, _ := ac.GetClusterHandle(nettypes.CONTEXT_CLUSTER_APP, clusterProvider+nettypes.SEPARATOR+cluster)
+ acCluster := clusterProvider + nettypes.SEPARATOR + cluster
+ clusterhandle, _ := ac.GetClusterHandle(nettypes.CONTEXT_CLUSTER_APP, acCluster)
var orderinstr struct {
Resorder []string `json:"resorder"`
@@ -112,7 +113,7 @@ func Apply(ctxVal interface{}, clusterProvider, cluster string) error {
for _, resource := range resources {
orderinstr.Resorder = append(orderinstr.Resorder, resource.name)
resdep[resource.name] = "go"
- _, err = ac.AddResource(clusterhandle, resource.name, resource.value)
+ _, err := ac.AddResource(clusterhandle, resource.name, resource.value)
if err != nil {
cleanuperr := ac.DeleteCompositeApp()
if cleanuperr != nil {