testing

package
v1.1.31 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

agents unit tests

Index

Constants

View Source
const AgentDHCPNetworksListResult = `` /* 1130-byte string literal not displayed */

AgentDHCPNetworksListResult represents raw response for the ListDHCPNetworks request.

View Source
const AgentL3RoutersListResult = `` /* 2641-byte string literal not displayed */

AgentL3ListListResult represents raw response for the ListL3Routers request.

View Source
const AgentUpdateRequest = `
{
    "agent": {
        "description": "My OVS agent for OpenStack",
        "admin_state_up": true
    }
}
`

AgentUpdateRequest represents raw request to update an Agent.

View Source
const AgentsGetResult = `` /* 787-byte string literal not displayed */

AgentsGetResult represents raw response for the Get request.

View Source
const AgentsListResult = `` /* 1414-byte string literal not displayed */

AgentsListResult represents raw response for the List request.

View Source
const AgentsUpdateResult = `` /* 838-byte string literal not displayed */

AgentsUpdateResult represents raw response for the Update request.

View Source
const ListBGPSpeakersResult = `` /* 591-byte string literal not displayed */
View Source
const ListDRAgentHostingBGPSpeakersResult = `` /* 1314-byte string literal not displayed */
View Source
const ScheduleBGPSpeakerRequest = `
{
    "bgp_speaker_id": "8edb2c68-0654-49a9-b3fe-030f92e3ddf6"
}
`
View Source
const ScheduleDHCPNetworkRequest = `
{
    "network_id": "1ae075ca-708b-4e66-b4a7-b7698632f05f"
}
`

ScheduleDHCPNetworkRequest represents raw request for the ScheduleDHCPNetwork request.

View Source
const ScheduleL3RouterRequest = `
{
    "router_id": "43e66290-79a4-415d-9eb9-7ff7919839e1"
}
`

ScheduleL3RouterRequest represents raw request for the ScheduleL3Router request.

Variables

View Source
var Agent = agents.Agent{
	ID:              "43583cf5-472e-4dc8-af5b-6aed4c94ee3a",
	AdminStateUp:    true,
	AgentType:       "Open vSwitch agent",
	Description:     "My OVS agent for OpenStack",
	Alive:           true,
	ResourcesSynced: true,
	Binary:          "neutron-openvswitch-agent",
	Configurations: map[string]interface{}{
		"ovs_hybrid_plug":            false,
		"datapath_type":              "system",
		"vhostuser_socket_dir":       "/var/run/openvswitch",
		"log_agent_heartbeats":       false,
		"l2_population":              true,
		"enable_distributed_routing": false,
	},
	CreatedAt:          time.Date(2017, 7, 26, 23, 2, 5, 0, time.UTC),
	StartedAt:          time.Date(2018, 6, 26, 21, 46, 20, 0, time.UTC),
	HeartbeatTimestamp: time.Date(2019, 1, 9, 11, 43, 01, 0, time.UTC),
	Host:               "compute3",
	Topic:              "N/A",
}

Agent represents a sample Agent struct.

View Source
var Agent1 = agents.Agent{
	ID:           "59186d7b-b512-4fdf-bbaf-5804ffde8811",
	AdminStateUp: true,
	AgentType:    "Open vSwitch agent",
	Alive:        true,
	Binary:       "neutron-openvswitch-agent",
	Configurations: map[string]interface{}{
		"datapath_type": "system",
		"extensions": []interface{}{
			"qos",
		},
	},
	CreatedAt:          time.Date(2017, 7, 26, 23, 15, 44, 0, time.UTC),
	StartedAt:          time.Date(2018, 6, 26, 21, 46, 19, 0, time.UTC),
	HeartbeatTimestamp: time.Date(2019, 1, 9, 10, 28, 53, 0, time.UTC),
	Host:               "compute1",
	Topic:              "N/A",
}

Agent1 represents first unmarshalled address scope from the AgentsListResult.

View Source
var Agent2 = agents.Agent{
	ID:           "76af7b1f-d61b-4526-94f7-d2e14e2698df",
	AdminStateUp: true,
	AgentType:    "Open vSwitch agent",
	Alive:        true,
	Binary:       "neutron-openvswitch-agent",
	Configurations: map[string]interface{}{
		"datapath_type": "system",
		"extensions": []interface{}{
			"qos",
		},
	},
	CreatedAt:          time.Date(2017, 1, 22, 14, 00, 50, 0, time.UTC),
	StartedAt:          time.Date(2018, 11, 6, 12, 9, 17, 0, time.UTC),
	HeartbeatTimestamp: time.Date(2019, 1, 9, 10, 28, 50, 0, time.UTC),
	Host:               "compute2",
	Topic:              "N/A",
}

Agent2 represents second unmarshalled address scope from the AgentsListResult.

View Source
var BGPAgent1 = agents.Agent{
	ID:           "60d78b78-b56b-4d91-a174-2c03159f6bb6",
	AdminStateUp: true,
	AgentType:    "BGP dynamic routing agent",
	Alive:        true,
	Binary:       "neutron-bgp-dragent",
	Configurations: map[string]interface{}{
		"advertise_routes": float64(2),
		"bgp_peers":        float64(2),
		"bgp_speakers":     float64(1),
	},
	CreatedAt:          time.Date(2020, 9, 17, 20, 8, 58, 0, time.UTC),
	StartedAt:          time.Date(2021, 5, 4, 11, 13, 12, 0, time.UTC),
	HeartbeatTimestamp: time.Date(2021, 9, 13, 19, 55, 1, 0, time.UTC),
	Host:               "agent1.example.com",
	Topic:              "bgp_dragent",
}
View Source
var BGPAgent2 = agents.Agent{
	ID:           "d0bdcea2-1d02-4c1d-9e79-b827e77acc22",
	AdminStateUp: true,
	AgentType:    "BGP dynamic routing agent",
	Alive:        true,
	Binary:       "neutron-bgp-dragent",
	Configurations: map[string]interface{}{
		"advertise_routes": float64(2),
		"bgp_peers":        float64(2),
		"bgp_speakers":     float64(1),
	},
	CreatedAt:          time.Date(2020, 9, 17, 20, 8, 15, 0, time.UTC),
	StartedAt:          time.Date(2021, 5, 4, 11, 13, 13, 0, time.UTC),
	HeartbeatTimestamp: time.Date(2021, 9, 13, 19, 54, 47, 0, time.UTC),
	Host:               "agent2.example.com",
	Topic:              "bgp_dragent",
}

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