Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Fixes #1204: Missing dependency "snap-plugin-lib-go" in glide.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-krolik committed Sep 15, 2016
1 parent 0922dec commit 5d31ecb
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 15 deletions.
1 change: 1 addition & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ import:
version: 0032a855ba5c8a3c8e0d71c2deef354b70af1584
- package: gopkg.in/yaml.v2
version: c1cd2254a6dd314c9d73c338c12688c9325d85c6
- package: github.com/intelsdi-x/snap-plugin-lib-go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2015 Intel Corporation
Copyright 2016 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion plugin/collector/snap-plugin-collector-mock2-grpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2015 Intel Corporation
Copyright 2016 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2015 Intel Corporation
Copyright 2016 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2015 Intel Corporation
Copyright 2016 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2015 Intel Corporation
Copyright 2016 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
13 changes: 3 additions & 10 deletions plugin/collector/snap-plugin-collector-mock2-grpc/mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2015 Intel Corporation
Copyright 2016 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -82,15 +82,8 @@ func (f *Mock) CollectMetrics(mts []plugin.Metric) ([]plugin.Metric, error) {
data := randInt(65, 90) + 1000
// prepare namespace as a copy of incoming dynamic namespace,
// but with the set value of dynamic element
ns := plugin.NewNamespace()
for j, ne := range mts[i].Namespace {
if ne.IsDynamic() {
ns = ns.AddDynamicElement(ne.Name, ne.Description)
ns[j].Value = host
} else {
ns = ns.AddStaticElement(ne.Value)
}
}
ns := plugin.CopyNamespace(mts[i].Namespace)
ns[2].Value = host
// metric with set data, ns, timestamp and the version of the plugin
mt := plugin.Metric{
Data: data,
Expand Down

0 comments on commit 5d31ecb

Please sign in to comment.