diff options
author | Eric Multanen <eric.w.multanen@intel.com> | 2020-07-22 14:11:05 -0700 |
---|---|---|
committer | Eric Multanen <eric.w.multanen@intel.com> | 2020-08-03 15:40:09 -0700 |
commit | b2c23afb03b393b05fe38dd7c54b1de3c42deaf3 (patch) | |
tree | 5e845ad676a62e4bde17a6c4a846544164b0ad40 /src/clm/api | |
parent | d6f900721c81a2c03cb1a21a3d2064e9a69fc4b7 (diff) |
Add StateInfo structure synced resources
Add a StateInfo structure to the Cluster and
Deployment-Intent-Group resources to keep track of
the lifecycle state of these resources. Moved the
appcontext id that was being kept into this structure
as well. Enabled the approve state (and API) for
the deployment intent group.
Issue-ID: MULTICLOUD-1042
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Change-Id: I36602d8a0658d9d6d37b8799f9a372a7d1042496
Diffstat (limited to 'src/clm/api')
-rw-r--r-- | src/clm/api/clusterhandler_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/clm/api/clusterhandler_test.go b/src/clm/api/clusterhandler_test.go index 4bbc91b1..076718df 100644 --- a/src/clm/api/clusterhandler_test.go +++ b/src/clm/api/clusterhandler_test.go @@ -28,8 +28,8 @@ import ( "testing" "github.com/onap/multicloud-k8s/src/clm/pkg/cluster" - "github.com/onap/multicloud-k8s/src/orchestrator/pkg/appcontext" types "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module/types" + "github.com/onap/multicloud-k8s/src/orchestrator/pkg/state" pkgerrors "github.com/pkg/errors" ) @@ -43,7 +43,7 @@ type mockClusterManager struct { ClusterProviderItems []cluster.ClusterProvider ClusterItems []cluster.Cluster ClusterContentItems []cluster.ClusterContent - ClusterContextItems []appcontext.AppContext + ClusterStateInfo []state.StateInfo ClusterLabelItems []cluster.ClusterLabel ClusterKvPairsItems []cluster.ClusterKvPairs ClusterList []string @@ -102,12 +102,12 @@ func (m *mockClusterManager) GetClusterContent(provider, name string) (cluster.C return m.ClusterContentItems[0], nil } -func (m *mockClusterManager) GetClusterContext(provider, name string) (appcontext.AppContext, string, error) { +func (m *mockClusterManager) GetClusterState(provider, name string) (state.StateInfo, error) { if m.Err != nil { - return appcontext.AppContext{}, "", m.Err + return state.StateInfo{}, m.Err } - return m.ClusterContextItems[0], "", nil + return m.ClusterStateInfo[0], nil } func (m *mockClusterManager) GetClusters(provider string) ([]cluster.Cluster, error) { |