testing

package
v0.0.0-...-80377ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

resources unit tests

Index

Constants

View Source
const ResourceCreateLinkMetricsRequest = `` /* 439-byte string literal not displayed */

ResourceCreateLinkMetricsRequest represents a request to create a resource with linked metrics.

View Source
const ResourceCreateLinkMetricsResult = `` /* 854-byte string literal not displayed */

ResourceCreateLinkMetricsResult represents a raw server responce to the ResourceCreateLinkMetricsRequest.

View Source
const ResourceCreateWithMetricsRequest = `` /* 322-byte string literal not displayed */

ResourceCreateWithMetricsRequest represents a request to simultaneously create a resource with metrics.

View Source
const ResourceCreateWithMetricsResult = `` /* 773-byte string literal not displayed */

ResourceCreateWithMetricsResult represents a raw server responce to the ResourceCreateWithMetricsRequest.

View Source
const ResourceCreateWithoutMetricsRequest = `` /* 166-byte string literal not displayed */

ResourceCreateWithoutMetricsRequest represents a request to create a resource without metrics.

View Source
const ResourceCreateWithoutMetricsResult = `` /* 659-byte string literal not displayed */

ResourceCreateWithoutMetricsResult represents a raw server responce to the ResourceCreateNoMetricsRequest.

View Source
const ResourceGetResult = `` /* 1007-byte string literal not displayed */

ResourceGetResult represents raw server response from a server to a get requrest.

View Source
const ResourceListResult = `` /* 1865-byte string literal not displayed */

ResourceListResult represents raw server response from a server to a list call.

View Source
const ResourceUpdateCreateMetricsRequest = `` /* 159-byte string literal not displayed */

ResourceUpdateCreateMetricsRequest represents a request to update a resource and link some existing metrics.

View Source
const ResourceUpdateCreateMetricsResponse = `` /* 742-byte string literal not displayed */

ResourceUpdateCreateMetricsResponse represents a raw server responce to the ResourceUpdateLinkMetricsRequest.

View Source
const ResourceUpdateLinkMetricsRequest = `` /* 150-byte string literal not displayed */

ResourceUpdateLinkMetricsRequest represents a request to update a resource and link some existing metrics.

View Source
const ResourceUpdateLinkMetricsResponse = `` /* 782-byte string literal not displayed */

ResourceUpdateLinkMetricsResponse represents a raw server responce to the ResourceUpdateLinkMetricsRequest.

Variables

View Source
var Resource1 = resources.Resource{
	CreatedByProjectID: "3d40ca37723449118987b9f288f4ae84",
	CreatedByUserID:    "fdcfb420c09645e69e177a0bb1950884",
	Creator:            "fdcfb420c09645e69e177a0bb1950884:3d40ca37723449118987b9f288f4ae84",
	ID:                 "1f3a0724-1807-4bd1-81f9-ee18c8ff6ccc",
	Metrics: map[string]string{
		"cpu.delta":    "2df1515e-6325-4d49-af0d-1052f6462fe4",
		"memory.usage": "777a01d6-4694-49cb-b86a-5ba9fd4e609e",
	},
	OriginalResourceID: "1f3a0724-1807-4bd1-81f9-ee18c8ff6ccc",
	ProjectID:          "4154f08883334e0494c41155c33c0fc9",
	RevisionStart:      time.Date(2018, 1, 2, 11, 39, 33, 942419000, time.UTC),
	RevisionEnd:        time.Time{},
	StartedAt:          time.Date(2018, 1, 2, 11, 39, 33, 942391000, time.UTC),
	EndedAt:            time.Time{},
	Type:               "compute_instance",
	UserID:             "bd5874d666624b24a9f01c128871e4ac",
	ExtraAttributes: map[string]interface{}{
		"display_name": "MyInstance00",
		"flavor_name":  "2CPU4G",
		"host":         "compute010",
	},
}

Resource1 is an expected representation of a first resource from the ResourceListResult.

View Source
var Resource2 = resources.Resource{
	CreatedByProjectID: "3d40ca37723449118987b9f288f4ae84",
	CreatedByUserID:    "fdcfb420c09645e69e177a0bb1950884",
	Creator:            "fdcfb420c09645e69e177a0bb1950884:3d40ca37723449118987b9f288f4ae84",
	ID:                 "789a7f65-977d-40f4-beed-f717100125f5",
	Metrics: map[string]string{
		"disk.read.bytes.rate":  "ed1bb76f-6ccc-4ad2-994c-dbb19ddccbae",
		"disk.write.bytes.rate": "0a2da84d-4753-43f5-a65f-0f8d44d2766c",
	},
	OriginalResourceID: "789a7f65-977d-40f4-beed-f717100125f5",
	ProjectID:          "4154f08883334e0494c41155c33c0fc9",
	RevisionStart:      time.Date(2018, 1, 3, 11, 44, 31, 155773000, time.UTC),
	RevisionEnd:        time.Time{},
	StartedAt:          time.Date(2018, 1, 3, 11, 44, 31, 155732000, time.UTC),
	EndedAt:            time.Time{},
	Type:               "compute_instance_disk",
	UserID:             "bd5874d666624b24a9f01c128871e4ac",
	ExtraAttributes: map[string]interface{}{
		"disk_device_name": "sdb",
	},
}

Resource2 is an expected representation of a second resource from the ResourceListResult.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL