Improve flavor sample in notification sample tests

This patch adds an extra_specs key to the flavor used in the
instance action sample test to make the samples more realistic.

Change-Id: I5ec2b536469daaea16efb1ef1537a951dc52997a
Implements: bp flavor-notifications
This commit is contained in:
Balazs Gibizer 2017-01-11 19:50:20 +01:00
parent e05f678e0a
commit af17b95073
39 changed files with 121 additions and 37 deletions

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -46,7 +46,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -36,7 +36,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -36,7 +36,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 256,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "reset"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 256,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "reset"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -49,7 +49,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -54,7 +54,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -18,7 +18,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -28,7 +28,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -18,7 +18,9 @@
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {},
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"swap": 0,
"is_public": true,
"vcpu_weight": 0

View File

@ -143,6 +143,11 @@ class NotificationSampleTestBase(test.TestCase,
}}
flavor_id = self.api.post_flavor(flavor_body)['id']
extra_specs = {
"extra_specs": {
"hw:watchdog_action": "disabled"}}
self.admin_api.post_extra_spec(flavor_id, extra_specs)
# Ignore the create flavor notification
fake_notifier.reset()

View File

@ -487,6 +487,11 @@ class TestInstanceNotificationSample(
}
}
other_flavor_id = self.api.post_flavor(other_flavor_body)['id']
extra_specs = {
"extra_specs": {
"hw:watchdog_action": "reset"}}
self.admin_api.post_extra_spec(other_flavor_id, extra_specs)
# Ignore the create flavor notification
fake_notifier.reset()