aboutsummaryrefslogtreecommitdiffstats
path: root/src/dcm/pkg/module
diff options
context:
space:
mode:
Diffstat (limited to 'src/dcm/pkg/module')
-rw-r--r--src/dcm/pkg/module/apply.go8
-rw-r--r--src/dcm/pkg/module/logicalcloud.go6
2 files changed, 6 insertions, 8 deletions
diff --git a/src/dcm/pkg/module/apply.go b/src/dcm/pkg/module/apply.go
index a866934a..0b370f4a 100644
--- a/src/dcm/pkg/module/apply.go
+++ b/src/dcm/pkg/module/apply.go
@@ -305,12 +305,11 @@ func callRsyncUninstall(contextid interface{}) error {
return nil
}
-func CreateEtcdContext(logicalcloud LogicalCloud, clusterList []Cluster,
+func CreateEtcdContext(project string, logicalcloud LogicalCloud, clusterList []Cluster,
quotaList []Quota) error {
APP := "logical-cloud"
logicalCloudName := logicalcloud.MetaData.LogicalCloudName
- project := "test-project" // FIXME(igordc): temporary, need to do some rework in the LC structs
//Resource Names
namespaceName := strings.Join([]string{logicalcloud.MetaData.LogicalCloudName, "+namespace"}, "")
@@ -599,13 +598,12 @@ func CreateEtcdContext(logicalcloud LogicalCloud, clusterList []Cluster,
// TODO: rename these methods
// DestroyEtcdContext remove from rsync then delete appcontext and all resources
-func DestroyEtcdContext(logicalcloud LogicalCloud, clusterList []Cluster,
+func DestroyEtcdContext(project string, logicalcloud LogicalCloud, clusterList []Cluster,
quotaList []Quota) error {
logicalCloudName := logicalcloud.MetaData.LogicalCloudName
- // project := "test-project" // FIXME(igordc): temporary, need to do some rework in the LC structs
- _, ctxVal, err := NewLogicalCloudClient().GetLogicalCloudContext(logicalCloudName)
+ _, ctxVal, err := NewLogicalCloudClient().GetLogicalCloudContext(project, logicalCloudName)
if err != nil {
return pkgerrors.Wrapf(err, "Error finding AppContext for Logical Cloud: %v", logicalCloudName)
}
diff --git a/src/dcm/pkg/module/logicalcloud.go b/src/dcm/pkg/module/logicalcloud.go
index 61d7b7a5..49a2a639 100644
--- a/src/dcm/pkg/module/logicalcloud.go
+++ b/src/dcm/pkg/module/logicalcloud.go
@@ -73,7 +73,7 @@ type LogicalCloudManager interface {
GetAll(project string) ([]LogicalCloud, error)
Delete(project, name string) error
Update(project, name string, c LogicalCloud) (LogicalCloud, error)
- GetLogicalCloudContext(name string) (appcontext.AppContext, string, error)
+ GetLogicalCloudContext(project string, name string) (appcontext.AppContext, string, error)
}
// Interface facilitates unit testing by mocking functions
@@ -236,11 +236,11 @@ func (v *LogicalCloudClient) Update(project, logicalCloudName string, c LogicalC
}
// GetClusterContext returns the AppContext for corresponding provider and name
-func (v *LogicalCloudClient) GetLogicalCloudContext(name string) (appcontext.AppContext, string, error) {
+func (v *LogicalCloudClient) GetLogicalCloudContext(project string, name string) (appcontext.AppContext, string, error) {
//Construct key and tag to select the entry
key := LogicalCloudKey{
LogicalCloudName: name,
- Project: "test-project", // FIXME(igordc): temporary, need to do some rework in the LC structs
+ Project: project,
}
value, err := db.DBconn.Find(v.storeName, key, v.tagContext)