{"id":13522,"date":"2015-01-26T13:07:44","date_gmt":"2015-01-26T04:07:44","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=13522"},"modified":"2015-01-26T13:07:59","modified_gmt":"2015-01-26T04:07:59","slug":"nova-hooks-%e3%81%ab%e3%82%88%e3%82%8b%e3%82%a4%e3%83%99%e3%83%b3%e3%83%88%e3%83%8f%e3%83%b3%e3%83%89%e3%83%aa%e3%83%b3%e3%82%b0","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2015\/01\/13522\/","title":{"rendered":"nova-hooks \u306b\u3088\u308b\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0"},"content":{"rendered":"<p>\u3000\u3053\u3093\u306b\u3061\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u672c\u90e8\u306e\u5927\u5c71\u88d5\u6cf0\u3067\u3059\u3002\u4eca\u65e5\u306f (\u6050\u3089\u304f) \u3042\u3093\u307e\u308a\u77e5\u3089\u308c\u3066\u3044\u306a\u3044 OpenStack \u306e\u30de\u30a4\u30ca\u30fc\u6a5f\u80fd\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u4eca\u65e5\u306e\u5185\u5bb9\u306f <a href='http:\/\/docs.openstack.org\/developer\/nova\/devref\/hooks.html'>nova-hooks<\/a> \u3092\u7528\u3044\u305f\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306e\u4ed5\u7d44\u307f\u3068\u5b9f\u88c5\u3001\u305d\u3057\u3066\u5b9f\u969b\u306b\u52d5\u4f5c\u3055\u305b\u305f\u969b\u306b\u3069\u3046\u306a\u308b\u306e\u304b\u307e\u3067\u898b\u3066\u3086\u304d\u307e\u3059\u3002\u5c1a\u3001\u4eca\u56de\u5229\u7528\u3057\u305f OpenStack \u306e\u74b0\u5883\u306f Juno (2014.2.1-0ubuntu1~cloud0) \u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>nova-hooks \u3063\u3066\u306a\u306b\uff1f<\/h2>\n<p>\u3000nova-hooks \u306b\u3088\u3063\u3066\u3001OpenStack \u672c\u4f53\u306e nova.hooks \u304c\u30c7\u30b3\u30ec\u30fc\u30c8\u3055\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u306b\u5bfe\u3057\u3066\u3001\u4efb\u610f\u306e\u51e6\u7406\u3092\u95a2\u9023\u3065\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u3001nova.hooks \u304c\u30c7\u30b3\u30ec\u30fc\u30c8\u3055\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u306b\u7d10\u3065\u3044\u305f\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306e Python \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3067\u3001nova-hooks \u306f\u5f53\u8a72\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u308b\u524d\u3068\u5f8c\u306b\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306e\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u3053\u306e\u8fba\u308a\u306e\u4ed5\u7d44\u307f\u306f\u3068\u3066\u3082\u6d17\u7df4\u3055\u308c\u3066\u304a\u308a\u3001\u5f8c\u3067\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u3092\u4ea4\u3048\u306a\u304c\u3089\u89e3\u8aac\u3057\u3066\u3086\u304d\u307e\u3059\u3002<\/p>\n<h2>\u4f55\u304c\u3046\u308c\u3057\u3044\u306e\uff1f<\/h2>\n<p>\u3000\u73fe\u5728 nova-hooks \u304c\u30c7\u30b3\u30ec\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u306f\u3001nova-api \u304c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210\u6642\u306b\u5b9f\u884c\u3059\u308b\u30e1\u30bd\u30c3\u30c9 (create) \u3068\u3001\u540c\u3058\u304f nova-api \u304c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u524a\u9664\u8981\u6c42\u3092\u53d7\u3051\u53d6\u3063\u305f\u969b\u306b\u5b9f\u884c\u3059\u308b\u5185\u90e8\u30e1\u30bd\u30c3\u30c9 (_delete_instance) \u306e\uff12\u3064\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u307e\u305f\u3053\u306e\u4ed6\u306b\u3082 nova-network \u306b\u304a\u3044\u3066\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u6709\u52b9\u306b\u306a\u3063\u305f\u969b\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9 (update_instance_cache_with_nw_info) \u3082\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3000\u4f8b\u3048\u3070\u300c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u4f5c\u6210 (\u524a\u9664) \u3055\u308c\u305f\u969b\u306b\u3001\u8ab2\u91d1\u30b7\u30b9\u30c6\u30e0\u3068\u9023\u643a\u3057\u3066\u5f53\u8a72\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5229\u7528\u3057\u305f\u30e6\u30fc\u30b6\u3078\u8acb\u6c42\u3092\u66f4\u65b0\u3059\u308b\u306a\u3069\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u6210\u30fb\u524a\u9664\u306b\u9023\u52d5\u3057\u3066\u5916\u90e8\u306e\u30b7\u30b9\u30c6\u30e0\u3084\u30b5\u30fc\u30d3\u30b9\u3068\u9023\u643a\u3059\u308b\u969b\u306b\u4fbf\u5229\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>\u3069\u3093\u306a\u3075\u3046\u306b\u4f7f\u3048\u308b\u306e\uff1f<\/h2>\n<p>\u3000\u3067\u306f\u5b9f\u969b\u306b\u3069\u3093\u306a\u98a8\u306b\u4f7f\u3048\u3066\u3001\u3069\u3093\u306a\u4e8b\u304c\u51fa\u304d\u308b\u306e\u304b\u3092\u30b3\u30fc\u30c9\u3092\u4ea4\u3048\u306a\u304c\u3089\u898b\u3066\u3086\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u4f8b\u3068\u3057\u3066\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210\u6642\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u306b\u5bfe\u3057\u3066\u3001\u300c\u5165\u529b\u60c5\u5831\u306e\u30ed\u30b0\u3092\u5410\u304d\u51fa\u3059\u300d\u51e6\u7406\u3092\u884c\u3046\u30af\u30e9\u30b9\u3092\u95a2\u9023\u4ed8\u3051\u307e\u3059\u3002<br \/>\n\u3000nova-api \u306b\u5bfe\u3057\u3066\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210\u8981\u6c42\u304c\u5230\u7740\u3059\u308b\u3068\u3001\u4ee5\u4e0b nova.compute.api.API \u306e create \u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\" title=\"nova\/compute\/api.rb\">\nclass API(base.Base):\n    \"\"\"API for interacting with the compute manager.\"\"\"\n...\n    @hooks.add_hook(\"create_instance\")\n    def create(self, context, instance_type,\n               image_href, kernel_id=None, ramdisk_id=None,\n               min_count=None, max_count=None,\n               display_name=None, display_description=None,\n               key_name=None, key_data=None, security_group=None,\n               availability_zone=None, user_data=None, metadata=None,\n               injected_files=None, admin_password=None,\n               block_device_mapping=None, access_ip_v4=None,\n               access_ip_v6=None, requested_networks=None, config_drive=None,\n               auto_disk_config=None, scheduler_hints=None, legacy_bdm=True,\n               shutdown_terminate=False, check_server_group_quota=False):\n<\/pre>\n<p>\u3000<br \/>\n\u3000create \u30e1\u30bd\u30c3\u30c9\u306b\u30c7\u30b3\u30ec\u30fc\u30bf\u5f0f add_hook \u304c\u9069\u5fdc\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u5bfe\u3057\u3001\u5f8c\u8ff0\u3059\u308b\u65b9\u6cd5\u306b\u3088\u3063\u3066\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306e\u30af\u30e9\u30b9\u3092\u7d10\u4ed8\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3000add_hook \u306b\u6e21\u3055\u308c\u3066\u3044\u308b\u5f15\u6570 \"create_instance\" \u306f\u3001nova-hooks \u306b\u5bfe\u3057\u3066\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306e\u30af\u30e9\u30b9\u3092\u3053\u306e create \u30e1\u30bd\u30c3\u30c9\u306b\u7d10\u4ed8\u3051\u308b\u305f\u3081\u306e\u8b58\u5225\u5b50\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3000\u305d\u308c\u3067\u306f\u3001\u30e6\u30fc\u30b6\u5b9a\u7fa9\u30af\u30e9\u30b9\u3068\u30e6\u30fc\u30b6\u5b9a\u7fa9\u30af\u30e9\u30b9\u3092 nova-hooks \u306b\u767b\u9332\u3059\u308b\u51e6\u7406\u306b\u3064\u3044\u3066\u898b\u3066\u3086\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30e6\u30fc\u30b6\u5b9a\u7fa9\u30af\u30e9\u30b9\u306e\u4f5c\u6210<\/h3>\n<p>\u3000\u307e\u305a\u306f\u30e6\u30fc\u30b6\u5b9a\u7fa9\u30af\u30e9\u30b9\u306e\u5b9f\u88c5\u306b\u3064\u3044\u3066\u898b\u3066\u3086\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u304c nova.compute.api.API \u30af\u30e9\u30b9\u306e create \u30e1\u30bd\u30c3\u30c9\u3092\u30d5\u30c3\u30af\u3059\u308b\u30e6\u30fc\u30b6\u5b9a\u7fa9\u30af\u30e9\u30b9 (MyCreateHook) \u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\" title=\"create.rb\">\n#!\/usr\/bin\/python\n\nfrom nova.openstack.common import log as logging\n\nLOG = logging.getLogger(__name__)\n\nclass MyCreateHook(object):\n  \"\"\"This is an example to experience nova-hooks\"\"\"\n\n  def pre(self, *args, **kwargs):\n    for arg in args:\n      LOG.info(\"args: %s\" % (str(arg)))\n    for key, value in kwargs.items():\n      LOG.info(\"kwargs: (key, value) = (%s, %s)\" % (key, str(value)))\n\n  def post(self, *args, **kwargs):\n    for arg in args:\n      LOG.info(\"args: %s\" % (str(arg)))\n    for key, value in kwargs.items():\n      LOG.info(\"kwargs: (key, value) = (%s, %s)\" % (key, str(value)))\n<\/pre>\n<p>\u3000MyCreateHook \u306b\u306f\u3001nova.compute.api.API \u30af\u30e9\u30b9\u306e create \u30e1\u30bd\u30c3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u308b\u524d\u306b\u547c\u3073\u51fa\u3055\u308c\u308b (pre) \u30e1\u30bd\u30c3\u30c9\u3068\u5b9f\u884c\u5f8c\u306b\u547c\u3073\u51fa\u3055\u308c\u308b (post) \u30e1\u30bd\u30c3\u30c9\u306e 2 \u3064\u3060\u3051\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3000\u5404\u30e1\u30bd\u30c3\u30c9\u306e (*args, **kwargs) \u3068\u3044\u3046\u5f15\u6570\u306e\u5f62\u5f0f\u306f python \u3067\u6c4e\u7528\u7684\u306a\u53ef\u5909\u9577\u5f15\u6570\u3092\u53d6\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u6642\u306e\u5b9a\u77f3\u306e\u3088\u3046\u3067\u3001\u547c\u3073\u51fa\u3057\u5074\u3067\u30ea\u30b9\u30c8\u5f62\u5f0f\u3068\u30cf\u30c3\u30b7\u30e5\u5f62\u5f0f\u3067\u5f15\u6570\u3092\u6e21\u3057\u305f\u5834\u5408\u306b\u304a\u3044\u3066\u3082\u3001\u305d\u308c\u305e\u308c args \u3068 kwargs \u3067\u53d7\u3051\u53d6\u308c\u308b\u306e\u3067\u7d71\u4e00\u7684\u306a\u8868\u8a18\u3067\u5b9f\u88c5\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3000MyCreateHook \u306e pre\/post \u306e\u5404\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u305d\u308c\u305e\u308c\u3001<a href='http:\/\/docs.openstack.org\/developer\/nova\/api\/nova.openstack.common.log.html'>nova.openstack.common.log \u30e2\u30b8\u30e5\u30fc\u30eb<\/a> \u3092\u4f7f\u3063\u3066\u5f15\u6570\u3092 OpenStack \u306e\u30ed\u30b0\u306b\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3000\u6b21\u306b\u3053\u308c\u3092\u767b\u9332\u3057\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210\u6642\u306b MyCreateHook \u3067\u51e6\u7406\u3092\u53d7\u3051\u53d6\u308c\u308b\u3068\u3053\u308d\u307e\u3067\u3092\u898b\u3066\u3086\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30e6\u30fc\u30b6\u5b9a\u7fa9\u30af\u30e9\u30b9\u306e\u767b\u9332\u3000<\/h3>\n<p>\u3000nova-hooks \u306b MyCreateHook \u30af\u30e9\u30b9\u3092\u767b\u9332\u3059\u308b\u306b\u306f python \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u3069\u306e\u30af\u30e9\u30b9\u3092 nova-hooks \u306b\u30c7\u30b3\u30ec\u30fc\u30c8\u3055\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u306b\u7d10\u4ed8\u3051\u308b\u304b\u306e\u8a2d\u5b9a\u3092\u305d\u308c\u305e\u308c python \u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u6a5f\u69cb <a href='https:\/\/pypi.python.org\/pypi\/setuptools'>setuptools<\/a> \u3092\u4f7f\u3063\u3066\u884c\u3044\u307e\u3059\u3002<br \/>\n\u3000\u4ee5\u4e0b\u3067\u306f\u3001MyCreateHook \u30af\u30e9\u30b9\u3092\u542b\u3080 nova_hooks_example \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\" title=\"setup.rb\">\n#!\/usr\/bin\/env python\n\nimport setuptools\n\nsetuptools.setup(\n    name=\"nova_hooks_example\",\n    packages=['myhook'],\n    entry_points={\n        'nova.hooks': [\n            'create_instance=myhook.create:MyCreateHook'\n        ]\n    },\n)\n<\/pre>\n<p>\u5c1a\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30c4\u30ea\u30fc\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>\n.\n\u251c\u2500\u2500 myhook\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 create.py\n\u2514\u2500\u2500 setup.py\n<\/pre>\n<p>\u3000Python \u306b\u306f\u3001\u52d5\u7684\u306a\u30b5\u30fc\u30d3\u30b9\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u62e1\u5f35\u306e\u4ed5\u7d44\u307f (https:\/\/pythonhosted.org\/setuptools\/setuptools.html#dynamic-discovery-of-services-and-plugins) \u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\u3001setuptools \u3067\u306f\u3001entry_points \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5bfe\u3057\u3066\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u30eb\u30fc\u30c1\u30f3\u3092\u6e21\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3000nova-hooks \u3067\u306f\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u30c7\u30b3\u30ec\u30fc\u30bf\u5f0f add_hook \u306e\u5f15\u6570\u3067\u6307\u5b9a\u3057\u305f\u540d\u524d\u3068\u3001\u30e6\u30fc\u30b6\u5b9a\u7fa9\u30af\u30e9\u30b9\u540d\u3092\u305d\u308c\u305e\u308c key \u3068 value \u306b\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u51e6\u7406\u306e\u7d10\u4ed8\u3051\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u52d5\u304b\u3057\u3066\u307f\u305f<\/h2>\n<p>\u3000\u305d\u308c\u3067\u306f nova_hooks_example \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u751f\u6210\u3001\u53ca\u3073\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b9f\u65bd\u3057\u307e\u3059\u3002<\/p>\n<pre>\nohyama@openstack-controller:~\/pypi$ sudo python setup.py install\nrunning install\nrunning bdist_egg\nrunning egg_info\ncreating nova_hooks_example.egg-info\nwriting nova_hooks_example.egg-info\/PKG-INFO\nwriting top-level names to nova_hooks_example.egg-info\/top_level.txt\nwriting dependency_links to nova_hooks_example.egg-info\/dependency_links.txt\nwriting entry points to nova_hooks_example.egg-info\/entry_points.txt\nwriting manifest file 'nova_hooks_example.egg-info\/SOURCES.txt'\nreading manifest file 'nova_hooks_example.egg-info\/SOURCES.txt'\nwriting manifest file 'nova_hooks_example.egg-info\/SOURCES.txt'\ninstalling library code to build\/bdist.linux-x86_64\/egg\nrunning install_lib\nrunning build_py\ncreating build\ncreating build\/lib.linux-x86_64-2.7\ncreating build\/lib.linux-x86_64-2.7\/myhook\ncopying myhook\/__init__.py -> build\/lib.linux-x86_64-2.7\/myhook\ncopying myhook\/create.py -> build\/lib.linux-x86_64-2.7\/myhook\ncreating build\/bdist.linux-x86_64\ncreating build\/bdist.linux-x86_64\/egg\ncreating build\/bdist.linux-x86_64\/egg\/myhook\ncopying build\/lib.linux-x86_64-2.7\/myhook\/__init__.py -> build\/bdist.linux-x86_64\/egg\/myhook\ncopying build\/lib.linux-x86_64-2.7\/myhook\/create.py -> build\/bdist.linux-x86_64\/egg\/myhook\nbyte-compiling build\/bdist.linux-x86_64\/egg\/myhook\/__init__.py to __init__.pyc\nbyte-compiling build\/bdist.linux-x86_64\/egg\/myhook\/create.py to create.pyc\ncreating build\/bdist.linux-x86_64\/egg\/EGG-INFO\ncopying nova_hooks_example.egg-info\/PKG-INFO -> build\/bdist.linux-x86_64\/egg\/EGG-INFO\ncopying nova_hooks_example.egg-info\/SOURCES.txt -> build\/bdist.linux-x86_64\/egg\/EGG-INFO\ncopying nova_hooks_example.egg-info\/dependency_links.txt -> build\/bdist.linux-x86_64\/egg\/EGG-INFO\ncopying nova_hooks_example.egg-info\/entry_points.txt -> build\/bdist.linux-x86_64\/egg\/EGG-INFO\ncopying nova_hooks_example.egg-info\/top_level.txt -> build\/bdist.linux-x86_64\/egg\/EGG-INFO\nzip_safe flag not set; analyzing archive contents...\ncreating dist\ncreating 'dist\/nova_hooks_example-0.0.0-py2.7.egg' and adding 'build\/bdist.linux-x86_64\/egg' to it\nremoving 'build\/bdist.linux-x86_64\/egg' (and everything under it)\nProcessing nova_hooks_example-0.0.0-py2.7.egg\nRemoving \/usr\/local\/lib\/python2.7\/dist-packages\/nova_hooks_example-0.0.0-py2.7.egg\nCopying nova_hooks_example-0.0.0-py2.7.egg to \/usr\/local\/lib\/python2.7\/dist-packages\nnova-hooks-example 0.0.0 is already the active version in easy-install.pth\n\nInstalled \/usr\/local\/lib\/python2.7\/dist-packages\/nova_hooks_example-0.0.0-py2.7.egg\nProcessing dependencies for nova-hooks-example==0.0.0\nFinished processing dependencies for nova-hooks-example==0.0.0\nohyama@openstack-controller:~\/pypi$ \n<\/pre>\n<p>\u3000\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306f\u3001\u5358\u7d14\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb (\/usr\/local\/lib\/python2.7\/dist-packages\/nova_hooks_example-0.0.0-py2.7.egg) \u3092\u524a\u9664\u3059\u308b\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3000\u3053\u306e\u72b6\u614b\u3067 nova-api \u3092\u518d\u8d77\u52d5\u3057\u3066\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u5185\u5bb9\u304c nova-api \u306e\u30ed\u30b0 (\/var\/log\/nova\/nova-api.log) \u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3000* <a href='http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/01\/pre-output.txt'>pre \u30e1\u30bd\u30c3\u30c9\u306e\u51fa\u529b<\/a><br \/>\n\u3000* <a href='http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/01\/post-output.txt'>post \u30e1\u30bd\u30c3\u30c9\u306e\u51fa\u529b<\/a><\/p>\n<h2>\u7d42\u308f\u308a\u306b<\/h2>\n<p>\u3000\u3044\u304b\u304c\u3060\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u3002MyCreateHook \u306e pre\/post \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4f5c\u6210 (\u524a\u9664) \u306b\u9023\u52d5\u3057\u3066\u3044\u308d\u3044\u308d\u51fa\u6765\u305d\u3046\u306a\u6c17\u304c\u3057\u3066\u304d\u305f\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\n\u3000\u4eca\u5f8c\u3082 OpenStack \u306e\u5c0f\u30cd\u30bf\u3092\u3061\u3087\u3053\u3061\u3087\u3053\u3068\u3054\u7d39\u4ecb\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u3053\u3093\u306b\u3061\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u672c\u90e8\u306e\u5927\u5c71\u88d5\u6cf0\u3067\u3059\u3002\u4eca\u65e5\u306f (\u6050\u3089\u304f) \u3042\u3093\u307e\u308a\u77e5\u3089\u308c\u3066\u3044\u306a\u3044 OpenStack \u306e\u30de\u30a4\u30ca\u30fc\u6a5f\u80fd\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u4eca\u65e5\u306e\u5185\u5bb9\u306f nova-hooks \u3092\u7528\u3044\u305f\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0 [&hellip;]<\/p>\n","protected":false},"author":121,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[81],"class_list":["post-13522","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-openstack"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/13522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/121"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=13522"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/13522\/revisions"}],"predecessor-version":[{"id":13537,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/13522\/revisions\/13537"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=13522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=13522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=13522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}