概述
补充一个OpenStack Wiki中的架构图
具体的配置如下:
1.修改 nova/openstack/common/notifier/api.py中的'notification_driver'的属性'nova.openstack.common.notifier'
2.修改 nova/notification.py
notify_state_opt = cfg.StrOpt('notify_on_state_change', default="vm_and_task_state",
help='If set, send compute.instance.update notifications on instance '
'state changes. Valid values are None for no notifications, '
'"vm_state" for notifications on VM state changes, or '
'"vm_and_task_state" for notifications on VM and task state '
'changes.')
notify_any_opt = cfg.BoolOpt('notify_on_any_change', default=False,
help='If set, send compute.instance.update notifications on instance '
'state changes. Valid values are False for no notifications, '
'True for notifications on any instance changes.')
3.以下是所有关于instance的notification信息
compute.instance.create.start/.end:
compute.instance.delete.start/.end:
compute.instance.rebuild.start/.end:
compute.instance.resize.prep.start/.end:
compute.instance.resize.confirm.start/.end:
compute.instance.resize.revert.start/.end:
compute.instance.exists:
compute.instance.update:
compute.instance.shutdown.start/.end
compute.instance.power_off.start/.end
compute.instance.power_on.start/.end
compute.instance.snapshot.start/.end
compute.instance.resize.start/.end
compute.instance.finish_resize.start/.end
{
"_context_roles": [
"admin"
],
……
"timestamp": "2012-08-28 16:32:07.952953",
"_context_auth_token": "5de0c5c684114c54a489e9dd
"_context_instance_lock_checked": true,
"_context_user_id": "ef06d77b48174683be8a5bd0
"payload": {
"state_description": "",
"availability_zone": null,
"ephemeral_gb": 0,
"instance_type_id": 3,
"deleted_at": "2012-08-28 16:32:07.785963",
"reservation_id": "r-0n0p0dmd",
"instance_id": "9452fa86-e244-4455-a484-62fd036e3851",
"user_id": "ef06d77b48174683be8a5bd0
"state": "deleted",
"launched_at": "",
"ramdisk_id": "",
"access_ip_v6": null,
"disk_gb": 80,
"access_ip_v4": null,
"kernel_id": "",
"host": "ubuntu",
"display_name": "12312312312321312",
"image_ref_url": "http://127.0.0.1:9292/images/556626ed-8a16-4dab-8043-01ec1de1a1c0",
"root_gb": 80,
"tenant_id": "a4778aa43f6d43c28774fb80
"created_at": "2012-08-28 16:24:10",
"memory_mb": 8192,
"instance_type": "m1.large",
"vcpus": 4,
"image_meta": {},
"architecture": null,
"os_type": null
},
"_context_project_name": "admin",
"_context_read_deleted": "no",
"priority": "INFO",
"_context_is_admin": true,
"_context_project_id": "a4778aa43f6d43c28774fb80
"_context_timestamp": "2012-08-28T16:32:06.348763",
"_context_user_name": "admin",
"publisher_id": "compute.ubuntu",
"message_id": "2969e38a-af19-472b-a895-d024b12883a4",
"_context_remote_address": "127.0.0.1"}
最后
以上就是大力鱼为你收集整理的OpenStack Notification System介绍的全部内容,希望文章能够帮你解决OpenStack Notification System介绍所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复