This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update vSphere yaml and dimensions (#1148)
* Fix minor problems and flag default metrics in metadata.yaml * Rename ESX IP dimension 'esx_ip' from 'host_name' * Remove extraneous 'os_type' dimension from ESX metrics * Apply esx_ip dimension to VM-level metrics * Add OS info as dimensions to VM metrics * Add vCenter IP dimension to all metrics to support multiple vCenters This is in support of new vSphere built in content: Issue: https://signalfuse.atlassian.net/browse/INT-1717
- Loading branch information
Pablo Collins
authored
Jan 17, 2020
1 parent
f0bd442
commit a3c5b1e
Showing
12 changed files
with
1,035 additions
and
975 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package service | ||
|
||
func copyMap(in map[string]string) map[string]string { | ||
out := make(map[string]string) | ||
for k, v := range in { | ||
out[k] = v | ||
} | ||
return out | ||
} | ||
|
||
func updateMap(target, updates map[string]string) { | ||
for k, v := range updates { | ||
target[k] = v | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package service | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestUpdateMap(t *testing.T) { | ||
target := map[string]string{"foo": "bar"} | ||
updates := map[string]string{"baz": "glarch"} | ||
updateMap(target, updates) | ||
require.Equal(t, target, map[string]string{"foo": "bar", "baz": "glarch"}) | ||
} |
Oops, something went wrong.