diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2018-10-17 15:04:26 -0700 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2018-10-17 15:04:29 -0700 |
commit | 0cf377f5ff0b1daa8d0cb004ad64490cf66dd94e (patch) | |
tree | 49c4102decf88664b6c576e8c6764c09ce25fbd8 | |
parent | 50a8fa521f98c04c82aa07ff893e20f431456509 (diff) |
Upload secrets even when domain already exists
Upload secrets even when domain was created before
Any secrets with same name are overwritten with
new values and new secrets are added to the domain
Provides capability to add to existing domains via
the commandline
Issue-ID: AAF-574
Change-Id: I77a842d8f16cf224b04c328ef2825ed7ea7deab1
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
-rw-r--r-- | sms-service/src/preload/preload.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sms-service/src/preload/preload.go b/sms-service/src/preload/preload.go index 2e654fa..7e54fb8 100644 --- a/sms-service/src/preload/preload.go +++ b/sms-service/src/preload/preload.go @@ -189,6 +189,10 @@ func (c *smsClient) createDomain(domain string) error { url := "/v1/sms/domain" err := c.sendPostRequest(url, message) if err != nil { + if strings.Contains(err.Error(), "existing domain") { + fmt.Println("Domain ", domain, " already exists...") + return nil + } return pkgerrors.Cause(err) } return nil |