summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-07-18 16:05:33 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-07-18 16:05:36 -0700
commitd605586c571f5bc059486d3b41a9709b5d9c10e3 (patch)
treebf4036fccca02881c8f1b97bd98f8a61b19d137b
parent045ce10b7c48136dee24761e23ea0156f6255521 (diff)
Make profile db tags specific
Tags used in profile such as metadata are too generic. Instead we are using specific ones with the type prefixed. Issue-ID: MULTICLOUD-730 Change-Id: I2f189d35bc202f4a71e0a92ca5b7188ebfd1cef2 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
-rw-r--r--src/k8splugin/internal/app/instance_test.go4
-rw-r--r--src/k8splugin/internal/rb/profile.go4
-rw-r--r--src/k8splugin/internal/rb/profile_test.go18
3 files changed, 13 insertions, 13 deletions
diff --git a/src/k8splugin/internal/app/instance_test.go b/src/k8splugin/internal/app/instance_test.go
index 8e817f0e..3cb62ee1 100644
--- a/src/k8splugin/internal/app/instance_test.go
+++ b/src/k8splugin/internal/app/instance_test.go
@@ -51,7 +51,7 @@ func TestInstanceCreate(t *testing.T) {
Items: map[string]map[string][]byte{
rb.ProfileKey{RBName: "test-rbdef", RBVersion: "v1",
ProfileName: "profile1"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"profile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
@@ -59,7 +59,7 @@ func TestInstanceCreate(t *testing.T) {
"\"rb-version\":\"v1\"," +
"\"kubernetesversion\":\"1.12.3\"}"),
// base64 encoding of vagrant/tests/vnfs/testrb/helm/profile
- "content": []byte("H4sICLmjT1wAA3Byb2ZpbGUudGFyAO1Y32/bNhD2s/6Kg/KyYZZsy" +
+ "profilecontent": []byte("H4sICLmjT1wAA3Byb2ZpbGUudGFyAO1Y32/bNhD2s/6Kg/KyYZZsy" +
"78K78lLMsxY5gRxmqIYhoKWaJsYJWokZdfo+r/vSFmunCZNBtQJ1vF7sXX36e54vDN5T" +
"knGFlTpcEtS3jgO2ohBr2c/EXc/29Gg1+h0e1F32Ol1B1Gj3Ymifr8B7SPFc4BCaSIBG" +
"lII/SXeY/r/KIIg8NZUKiayEaw7nt7mdOQBrAkvqBqBL1ArWULflRJbJz4SYpEt2FJSJ" +
diff --git a/src/k8splugin/internal/rb/profile.go b/src/k8splugin/internal/rb/profile.go
index 37e9aba8..64449ebd 100644
--- a/src/k8splugin/internal/rb/profile.go
+++ b/src/k8splugin/internal/rb/profile.go
@@ -78,8 +78,8 @@ type ProfileClient struct {
func NewProfileClient() *ProfileClient {
return &ProfileClient{
storeName: "rbdef",
- tagMeta: "metadata",
- tagContent: "content",
+ tagMeta: "profilemetadata",
+ tagContent: "profilecontent",
manifestName: "manifest.yaml",
}
}
diff --git a/src/k8splugin/internal/rb/profile_test.go b/src/k8splugin/internal/rb/profile_test.go
index 7c9deac3..263c48ab 100644
--- a/src/k8splugin/internal/rb/profile_test.go
+++ b/src/k8splugin/internal/rb/profile_test.go
@@ -145,7 +145,7 @@ func TestGetProfile(t *testing.T) {
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
@@ -265,7 +265,7 @@ func TestUploadProfile(t *testing.T) {
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
@@ -306,7 +306,7 @@ func TestUploadProfile(t *testing.T) {
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile2"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
@@ -330,7 +330,7 @@ func TestUploadProfile(t *testing.T) {
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
@@ -425,14 +425,14 @@ func TestDownloadProfile(t *testing.T) {
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile1"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
"\"rb-name\":\"testresourcebundle\"," +
"\"rb-version\":\"v1\"," +
"\"kubernetesversion\":\"1.12.3\"}"),
- "content": []byte("H4sICLBr9FsAA3Rlc3QudGFyAO3OQQrCMBCF4aw9RU5" +
+ "profilecontent": []byte("H4sICLBr9FsAA3Rlc3QudGFyAO3OQQrCMBCF4aw9RU5" +
"QEtLE40igAUtSC+2IHt9IEVwIpYtShP/bvGFmFk/SLI08Re3IVCG077Rn" +
"b75zYZ2yztVV8N7XP9vWSWmzZ6mP+yxx0lrF7pJzjkN/Sz//1u5/6ppKG" +
"R/jVLrT0VUAAAAAAAAAAAAAAAAAABu8ALXoSvkAKAAA"),
@@ -449,7 +449,7 @@ func TestDownloadProfile(t *testing.T) {
mockdb: &db.MockDB{
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1", ProfileName: "testprofile2"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"testprofile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
@@ -512,7 +512,7 @@ func TestResolveProfile(t *testing.T) {
Items: map[string]map[string][]byte{
ProfileKey{RBName: "testresourcebundle", RBVersion: "v1",
ProfileName: "profile1"}.String(): {
- "metadata": []byte(
+ "profilemetadata": []byte(
"{\"profile-name\":\"profile1\"," +
"\"release-name\":\"testprofilereleasename\"," +
"\"namespace\":\"testnamespace\"," +
@@ -520,7 +520,7 @@ func TestResolveProfile(t *testing.T) {
"\"rb-version\":\"v1\"," +
"\"kubernetesversion\":\"1.12.3\"}"),
// base64 encoding of vagrant/tests/vnfs/testrb/helm/profile
- "content": []byte("H4sICLmjT1wAA3Byb2ZpbGUudGFyAO1Y32/bNhD2s/6Kg/KyYZZsy" +
+ "profilecontent": []byte("H4sICLmjT1wAA3Byb2ZpbGUudGFyAO1Y32/bNhD2s/6Kg/KyYZZsy" +
"78K78lLMsxY5gRxmqIYhoKWaJsYJWokZdfo+r/vSFmunCZNBtQJ1vF7sXX36e54vDN5T" +
"knGFlTpcEtS3jgO2ohBr2c/EXc/29Gg1+h0e1F32Ol1B1Gj3Ymifr8B7SPFc4BCaSIBG" +
"lII/SXeY/r/KIIg8NZUKiayEaw7nt7mdOQBrAkvqBqBL1ArWULflRJbJz4SYpEt2FJSJ" +