testing

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

placement resource providers

Index

Constants

View Source
const InventoriesBody = `` /* 683-byte string literal not displayed */
View Source
const ResourceProviderCreateBody = `` /* 344-byte string literal not displayed */
View Source
const ResourceProviderTestID = "99c09379-6e52-4ef8-9a95-b9ce6f68452e"
View Source
const ResourceProvidersBody = `` /* 806-byte string literal not displayed */
View Source
const TraitsBody = `` /* 131-byte string literal not displayed */
View Source
const UsagesBody = `` /* 132-byte string literal not displayed */

Variables

View Source
var ExpectedInventories = resourceproviders.ResourceProviderInventories{
	ResourceProviderGeneration: 7,
	Inventories: map[string]resourceproviders.Inventory{
		"DISK_GB": resourceproviders.Inventory{
			AllocationRatio: 1.0,
			MaxUnit:         35,
			MinUnit:         1,
			Reserved:        0,
			StepSize:        1,
			Total:           35,
		},
		"MEMORY_MB": resourceproviders.Inventory{
			AllocationRatio: 1.5,
			MaxUnit:         5825,
			MinUnit:         1,
			Reserved:        512,
			StepSize:        1,
			Total:           5825,
		},
		"VCPU": resourceproviders.Inventory{
			AllocationRatio: 16.0,
			MaxUnit:         4,
			MinUnit:         1,
			Reserved:        0,
			StepSize:        1,
			Total:           4,
		},
	},
}
View Source
var ExpectedResourceProvider1 = resourceproviders.ResourceProvider{
	Generation: 1,
	UUID:       "99c09379-6e52-4ef8-9a95-b9ce6f68452e",
	Links: []resourceproviders.ResourceProviderLinks{
		{
			Href: "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e",
			Rel:  "self",
		},
	},
	Name:               "vgr.localdomain",
	ParentProviderUUID: "542df8ed-9be2-49b9-b4db-6d3183ff8ec8",
	RootProviderUUID:   "542df8ed-9be2-49b9-b4db-6d3183ff8ec8",
}
View Source
var ExpectedResourceProvider2 = resourceproviders.ResourceProvider{
	Generation: 2,
	UUID:       "d0b381e9-8761-42de-8e6c-bba99a96d5f5",
	Links: []resourceproviders.ResourceProviderLinks{
		{
			Href: "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5",
			Rel:  "self",
		},
	},
	Name:               "pony1",
	ParentProviderUUID: "",
	RootProviderUUID:   "d0b381e9-8761-42de-8e6c-bba99a96d5f5",
}
View Source
var ExpectedTraits = resourceproviders.ResourceProviderTraits{
	ResourceProviderGeneration: 1,
	Traits: []string{
		"CUSTOM_HW_FPGA_CLASS1",
		"CUSTOM_HW_FPGA_CLASS3",
	},
}
View Source
var ExpectedUsages = resourceproviders.ResourceProviderUsage{
	ResourceProviderGeneration: 1,
	Usages: map[string]int{
		"DISK_GB":   1,
		"MEMORY_MB": 512,
		"VCPU":      1,
	},
}

Functions

func HandleResourceProviderCreate

func HandleResourceProviderCreate(t *testing.T)

func HandleResourceProviderGetInventories added in v0.9.0

func HandleResourceProviderGetInventories(t *testing.T)

func HandleResourceProviderGetTraits added in v0.10.0

func HandleResourceProviderGetTraits(t *testing.T)

func HandleResourceProviderGetUsages added in v0.9.0

func HandleResourceProviderGetUsages(t *testing.T)

func HandleResourceProviderList

func HandleResourceProviderList(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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