Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions internal/onetime/logusage/logusage.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ func NewCommand(lp log.Parameters, cloudProps *cpb.CloudProperties) *cobra.Comma
logUsageCmd.Flags().IntVar(&l.action, "a", 0, "usage action code")
logUsageCmd.Flags().IntVar(&l.usageError, "error", 0, "usage error code")
logUsageCmd.Flags().IntVar(&l.usageError, "e", 0, "usage error code")
logUsageCmd.Flags().StringVar(&l.image, "image", "", "the image url of the compute instance(optional), default value is retreived from metadata)")
logUsageCmd.Flags().StringVar(&l.image, "i", "", "the image url of the compute instance(optional), default value is retreived from metadata)")
logUsageCmd.Flags().StringVar(&l.image, "image", "", "the image url of the compute instance(optional), default value is retrieved from metadata)")
logUsageCmd.Flags().StringVar(&l.image, "i", "", "the image url of the compute instance(optional), default value is retrieved from metadata)")

return logUsageCmd
}
Expand All @@ -118,8 +118,8 @@ func (l *LogUsage) logUsageHandler(cmd *cobra.Command, cloudProps *cpb.CloudProp
log.Print("A usage status value is required.")
return fmt.Errorf("a usage status value is required")
case l.status == string(usagemetrics.StatusUpdated) && l.agentVersion == "":
log.Print("For status UPDATED, Agent Version is requried.")
return fmt.Errorf("for status UPDATED, Agent Version is requried")
log.Print("For status UPDATED, Agent Version is required.")
return fmt.Errorf("for status UPDATED, Agent Version is required")
case l.status == string(usagemetrics.StatusError) && l.usageError <= 0:
log.Print("For status ERROR, an error code is required.")
return fmt.Errorf("for status ERROR, an error code is required")
Expand Down
5 changes: 3 additions & 2 deletions internal/oraclemetrics/oraclemetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"github.com/GoogleCloudPlatform/workloadagent/internal/usagemetrics"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/cloudmonitoring"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/gce"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/gce/metadataserver"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/log"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/recovery"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/timeseries"
Expand Down Expand Up @@ -510,8 +511,8 @@ func queryMap(queries []*configpb.Query) map[string]*configpb.Query {
}

// convertCloudProperties converts Cloud Properties proto to CloudProperties struct.
func convertCloudProperties(cp *configpb.CloudProperties) *timeseries.CloudProperties {
return &timeseries.CloudProperties{
func convertCloudProperties(cp *configpb.CloudProperties) *metadataserver.CloudProperties {
return &metadataserver.CloudProperties{
ProjectID: cp.GetProjectId(),
InstanceID: cp.GetInstanceId(),
Zone: cp.GetZone(),
Expand Down
4 changes: 2 additions & 2 deletions internal/oraclemetrics/oraclemetrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/cloudmonitoring"
cmfake "github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/cloudmonitoring/fake"
gcefake "github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/gce/fake"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/gce/metadataserver"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/log"
"github.com/GoogleCloudPlatform/workloadagentplatform/integration/common/shared/timeseries"

mpb "google.golang.org/genproto/googleapis/api/metric"
mrespb "google.golang.org/genproto/googleapis/api/monitoredres"
Expand Down Expand Up @@ -556,7 +556,7 @@ func TestConvertCloudProperties(t *testing.T) {
Region: "region",
}

want := &timeseries.CloudProperties{
want := &metadataserver.CloudProperties{
ProjectID: "project-id",
InstanceID: "instance-id",
Zone: "zone",
Expand Down
2 changes: 2 additions & 0 deletions internal/secret/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// TODO: Move this to the common shared directory.

// Package secret provides a custom string type that hides sensitive data from output.
package secret

Expand Down
Loading