Documentation ¶
Overview ¶
clustering_policies_v1
Index ¶
- Constants
- Variables
- func HandleBadPolicyUpdate(t *testing.T)
- func HandleBadPolicyValidate(t *testing.T)
- func HandlePolicyCreate(t *testing.T)
- func HandlePolicyDelete(t *testing.T)
- func HandlePolicyGet(t *testing.T)
- func HandlePolicyList(t *testing.T)
- func HandlePolicyUpdate(t *testing.T)
- func HandlePolicyValidate(t *testing.T)
Constants ¶
View Source
const PolicyBadUpdateBody = `` /* 665-byte string literal not displayed */
View Source
const PolicyBadValidateBody = `` /* 665-byte string literal not displayed */
View Source
const PolicyCreateBody = `` /* 697-byte string literal not displayed */
View Source
const PolicyDeleteRequestID = "req-7328d1b0-9945-456f-b2cd-5166b77d14a8"
View Source
const PolicyGetBody = `` /* 747-byte string literal not displayed */
View Source
const PolicyIDtoDelete = "1"
View Source
const PolicyIDtoGet = "b99b3ab4-3aa6-4fba-b827-69b88b9c544a"
View Source
const PolicyIDtoUpdate = "b99b3ab4-3aa6-4fba-b827-69b88b9c544a"
View Source
const PolicyListBody1 = `` /* 742-byte string literal not displayed */
View Source
const PolicyListBody2 = `` /* 753-byte string literal not displayed */
View Source
const PolicyUpdateBody = `` /* 703-byte string literal not displayed */
View Source
const PolicyValidateBody = `` /* 703-byte string literal not displayed */
Variables ¶
View Source
var ExpectedCreatePolicy = policies.Policy{ CreatedAt: time.Date(2018, 4, 4, 0, 18, 36, 0, time.UTC), Data: map[string]interface{}{}, Domain: "", ID: "b99b3ab4-3aa6-4fba-b827-69b88b9c544a", Name: "delpol4", Project: "018cd0909fb44cd5bc9b7a3cd664920e", Spec: policies.Spec{ Description: "A policy for choosing victim node(s) from a cluster for deletion.", Properties: map[string]interface{}{ "hooks": map[string]interface{}{ "params": map[string]interface{}{ "queue": "zaqar_queue_name", }, "timeout": float64(180), "type": "zaqar", }, }, Type: "senlin.policy.deletion", Version: "1.1", }, Type: "senlin.policy.deletion-1.1", User: "fe43e41739154b72818565e0d2580819", }
View Source
var ExpectedGetPolicy = policies.Policy{ CreatedAt: time.Date(2018, 4, 2, 21, 43, 30, 0, time.UTC), Data: map[string]interface{}{}, Domain: "", ID: "b99b3ab4-3aa6-4fba-b827-69b88b9c544a", Name: "delpol", Project: "018cd0909fb44cd5bc9b7a3cd664920e", Spec: policies.Spec{ Description: "A policy for choosing victim node(s) from a cluster for deletion.", Properties: map[string]interface{}{ "criteria": "OLDEST_FIRST", "destroy_after_deletion": true, "grace_period": float64(60), "reduce_desired_capacity": false, }, Type: "senlin.policy.deletion", Version: "1.0", }, Type: "senlin.policy.deletion-1.0", User: "fe43e41739154b72818565e0d2580819", UpdatedAt: time.Date(2018, 4, 2, 0, 19, 12, 0, time.UTC), }
View Source
var ExpectedPolicies = [][]policies.Policy{ []policies.Policy{ExpectedPolicy1}, []policies.Policy{ExpectedPolicy2}, }
View Source
var ExpectedPolicy1 = policies.Policy{ CreatedAt: time.Date(2018, 4, 2, 21, 43, 30, 0, time.UTC), Data: map[string]interface{}{}, Domain: "", ID: "PolicyListBodyID1", Name: "delpol", Project: "018cd0909fb44cd5bc9b7a3cd664920e", Spec: policies.Spec{ Description: "A policy for choosing victim node(s) from a cluster for deletion.", Properties: map[string]interface{}{ "criteria": "OLDEST_FIRST", "destroy_after_deletion": true, "grace_period": float64(60), "reduce_desired_capacity": false, }, Type: "senlin.policy.deletion", Version: "1.0", }, Type: "senlin.policy.deletion-1.0", User: "fe43e41739154b72818565e0d2580819", UpdatedAt: time.Date(2018, 4, 2, 0, 19, 12, 0, time.UTC), }
View Source
var ExpectedPolicy2 = policies.Policy{ CreatedAt: time.Date(2018, 4, 2, 22, 29, 36, 0, time.UTC), Data: map[string]interface{}{}, Domain: "", ID: "PolicyListBodyID2", Name: "delpol2", Project: "018cd0909fb44cd5bc9b7a3cd664920e", Spec: policies.Spec{ Description: "A policy for choosing victim node(s) from a cluster for deletion.", Properties: map[string]interface{}{ "criteria": "OLDEST_FIRST", "destroy_after_deletion": true, "grace_period": float64(60), "reduce_desired_capacity": false, }, Type: "senlin.policy.deletion", Version: "1.0", }, Type: "senlin.policy.deletion-1.0", User: "fe43e41739154b72818565e0d2580819", UpdatedAt: time.Date(2018, 4, 2, 23, 15, 11, 0, time.UTC), }
View Source
var ExpectedUpdatePolicy = policies.Policy{ CreatedAt: time.Date(2018, 4, 2, 21, 43, 30, 0, time.UTC), Data: map[string]interface{}{}, Domain: "", ID: "b99b3ab4-3aa6-4fba-b827-69b88b9c544a", Name: "delpol4", Project: "018cd0909fb44cd5bc9b7a3cd664920e", Spec: policies.Spec{ Description: "A policy for choosing victim node(s) from a cluster for deletion.", Properties: map[string]interface{}{ "hooks": map[string]interface{}{ "params": map[string]interface{}{ "queue": "zaqar_queue_name", }, "timeout": float64(180), "type": "zaqar", }, }, Type: "senlin.policy.deletion", Version: "1.1", }, Type: "senlin.policy.deletion-1.1", User: "fe43e41739154b72818565e0d2580819", }
View Source
var ExpectedValidatePolicy = policies.Policy{ CreatedAt: time.Date(2018, 4, 2, 21, 43, 30, 0, time.UTC), Data: map[string]interface{}{}, Domain: "", ID: "b99b3ab4-3aa6-4fba-b827-69b88b9c544a", Name: "delpol4", Project: "018cd0909fb44cd5bc9b7a3cd664920e", Spec: policies.Spec{ Description: "A policy for choosing victim node(s) from a cluster for deletion.", Properties: map[string]interface{}{ "hooks": map[string]interface{}{ "params": map[string]interface{}{ "queue": "zaqar_queue_name", }, "timeout": float64(180), "type": "zaqar", }, }, Type: "senlin.policy.deletion", Version: "1.1", }, Type: "senlin.policy.deletion-1.1", User: "fe43e41739154b72818565e0d2580819", }
Functions ¶
func HandleBadPolicyUpdate ¶
func HandleBadPolicyValidate ¶
func HandlePolicyCreate ¶
func HandlePolicyDelete ¶
func HandlePolicyGet ¶
func HandlePolicyList ¶
func HandlePolicyUpdate ¶
func HandlePolicyValidate ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.