Change-Id: Ice472dc1c95ffb2ac6762e59c1490f30df5bac6f
Signed-off-by: is005q <idan.shalom@intl.att.com>
func ValidateAndBuildE2TInstanceKey(address string) (string, error) {
if address == "" {
func ValidateAndBuildE2TInstanceKey(address string) (string, error) {
if address == "" {
- return "", NewValidationError("#utils.ValidateAndBuildRanLoadInformationKey - an empty inventory name received")
+ return "", NewValidationError("#utils.ValidateAndBuildE2TInstanceKey - an empty E2T address received")
}
return fmt.Sprintf("E2TInstance:%s", address), nil
}
return fmt.Sprintf("E2TInstance:%s", address), nil
-}
\ No newline at end of file
+}
+
+func MapE2TAddressesToKeys(addresses []string) []string {
+
+ keys := []string{}
+ for _, v := range addresses {
+ if len(v) != 0 {
+ keys = append(keys, fmt.Sprintf("E2TInstance:%s", v))
+ }
+ }
+
+ return keys
+}