)]}'
{"doc/source/user/placement_policy_usage_guide.rst":[{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"f3d263333068d85b2f5a1a2dfb0f542e8f08e73d","unresolved":false,"context_lines":[{"line_number":14,"context_line":".. _ref-placement:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":17,"context_line":"VNF Placement policy"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Openstack nova server groups can be used to control the affinity and"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_8a01b707","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":3},"updated":"2018-06-04 07:10:09.000000000","message":"I prefer \"VDU\".","commit_id":"ec3142664cbdc3f441de4163fc90decfb312ec8b"},{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"f3d263333068d85b2f5a1a2dfb0f542e8f08e73d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        type: boolean"},{"line_number":60,"context_line":"        required: false"},{"line_number":61,"context_line":"        default: true"},{"line_number":62,"context_line":"        description: If the policy is not mandatory, it is allowed to continue"},{"line_number":63,"context_line":"        even if the nova-scheduler fails to assign compute hosts under the"},{"line_number":64,"context_line":"        policy."},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_6a253bae","line":62,"range":{"start_line":62,"start_character":51,"end_line":62,"end_character":53},"updated":"2018-06-04 07:10:09.000000000","message":", set this flag to \"false\". Then,","commit_id":"ec3142664cbdc3f441de4163fc90decfb312ec8b"},{"author":{"_account_id":26222,"name":"Cong Phuoc Hoang","email":"hoangphuocbk2.07@gmail.com","username":"hoangphuoc"},"change_message_id":"60a04529bf549ebc6515a2c92fb2d77d71a94a27","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \u0027false\u0027. Setting this flag to \u0027false\u0027 allows the VDU deployment"},{"line_number":64,"context_line":"        request to continue even if the nova-scheduler fails to assign"},{"line_number":65,"context_line":"        compute hosts under the policy."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Sample TOSCA with placement policy"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_c35ad081","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":0},"updated":"2018-06-08 02:44:22.000000000","message":"You should add \"targets\" here","commit_id":"4d761256616d2f5b478e38b7302cd7df0cd91302"}],"samples/tosca-templates/vnfd/tosca-placement-policy-anti-affinity.yaml":[{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"079058f9aba207edb126353171eaff6e311f150b","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        properties:"},{"line_number":73,"context_line":"          policy: anti-affinity"},{"line_number":74,"context_line":"          strict: true"},{"line_number":75,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":76,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f7c97a3_34927259","line":75,"range":{"start_line":75,"start_character":21,"end_line":75,"end_character":73},"updated":"2018-07-20 05:02:23.000000000","message":"Apply anti-affinity placement policy to applications servers","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"e1e9cd19d53c2bc33eb9e501ea3023df1340dde7","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        properties:"},{"line_number":73,"context_line":"          policy: anti-affinity"},{"line_number":74,"context_line":"          strict: true"},{"line_number":75,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":76,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f7c97a3_25bebacd","line":75,"range":{"start_line":75,"start_character":21,"end_line":75,"end_character":73},"in_reply_to":"5f7c97a3_34927259","updated":"2018-07-20 06:33:14.000000000","message":"Done","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"}],"tacker/tests/etc/samples/sample-tosca-vnfd-placement-policy-affinity.yaml":[{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"079058f9aba207edb126353171eaff6e311f150b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        properties:"},{"line_number":117,"context_line":"          policy: affinity"},{"line_number":118,"context_line":"          strict: true"},{"line_number":119,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":120,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f7c97a3_347b5229","line":119,"range":{"start_line":119,"start_character":21,"end_line":119,"end_character":73},"updated":"2018-07-20 05:02:23.000000000","message":"Apply affinity placement policy to applications servers","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"e1e9cd19d53c2bc33eb9e501ea3023df1340dde7","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        properties:"},{"line_number":117,"context_line":"          policy: affinity"},{"line_number":118,"context_line":"          strict: true"},{"line_number":119,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":120,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f7c97a3_e5a1a2a9","line":119,"range":{"start_line":119,"start_character":21,"end_line":119,"end_character":73},"in_reply_to":"5f7c97a3_347b5229","updated":"2018-07-20 06:33:14.000000000","message":"Done","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"}],"tacker/tests/etc/samples/sample-tosca-vnfd-placement-policy-anti-affinity.yaml":[{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"079058f9aba207edb126353171eaff6e311f150b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        properties:"},{"line_number":117,"context_line":"          policy: anti-affinity"},{"line_number":118,"context_line":"          strict: true"},{"line_number":119,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":120,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f7c97a3_d48f7e1f","line":119,"range":{"start_line":119,"start_character":21,"end_line":119,"end_character":73},"updated":"2018-07-20 05:02:23.000000000","message":"same","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"e1e9cd19d53c2bc33eb9e501ea3023df1340dde7","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        properties:"},{"line_number":117,"context_line":"          policy: anti-affinity"},{"line_number":118,"context_line":"          strict: true"},{"line_number":119,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":120,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"5f7c97a3_85a46eb9","line":119,"range":{"start_line":119,"start_character":21,"end_line":119,"end_character":73},"in_reply_to":"5f7c97a3_d48f7e1f","updated":"2018-07-20 06:33:14.000000000","message":"Done","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"1d10726c8f6918e10d221609c838aada7b1e7276","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        type: tosca.policies.tacker.Placement"},{"line_number":116,"context_line":"        properties:"},{"line_number":117,"context_line":"          policy: anti-affinity"},{"line_number":118,"context_line":"          strict: true"},{"line_number":119,"context_line":"        description: Apply anti-affinity placement policy to the application servers"},{"line_number":120,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":18,"id":"5f7c97a3_6d3f7922","line":118,"range":{"start_line":118,"start_character":10,"end_line":118,"end_character":22},"updated":"2018-07-24 01:58:15.000000000","message":"What will happen if it false?\n\nIMO, it will be the soft-anti-affinity case. I tried, but VNF goes in error state.","commit_id":"079aaa00e7eed06223cf41c74b23e6f4d3e86e92"}],"tacker/tests/functional/vnfm/test_vnf_placement_policy.py":[{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"169025704eb2ad0cd4ce770ac42d10f1ad305659","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # skip the test if environment doesn\u0027t have multi compute nodes"},{"line_number":96,"context_line":"        compute_hosts \u003d self.novaclient().hypervisors.list()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        @unittest.skipIf(len(compute_hosts) \u003c\u003d 1, \"Environment don\u0027t have \""},{"line_number":99,"context_line":"                                                  \"multi-compute nodes.\")"},{"line_number":100,"context_line":"        def execute_anti_affinity_test():"},{"line_number":101,"context_line":"            self._test_create_delete_vnf("},{"line_number":102,"context_line":"                vnf_name\u003d\u0027test_vnf_with_placement_policy_anti_affinity\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_0c452b15","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":73},"updated":"2018-07-05 10:43:53.000000000","message":"why to skip this test case?\nIf no multinode, then next instance will not be created and should be handled accordingly. And test case should assert the same.","commit_id":"e9a80e27921cab37966a93d7da20272c5f1026da"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"e035cd4b8a109beceba19a6ea31b778dfa91b8c5","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # skip the test if environment doesn\u0027t have multi compute nodes"},{"line_number":96,"context_line":"        compute_hosts \u003d self.novaclient().hypervisors.list()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        @unittest.skipIf(len(compute_hosts) \u003c\u003d 1, \"Environment don\u0027t have \""},{"line_number":99,"context_line":"                                                  \"multi-compute nodes.\")"},{"line_number":100,"context_line":"        def execute_anti_affinity_test():"},{"line_number":101,"context_line":"            self._test_create_delete_vnf("},{"line_number":102,"context_line":"                vnf_name\u003d\u0027test_vnf_with_placement_policy_anti_affinity\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_a6dad046","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":73},"in_reply_to":"5f7c97a3_0c452b15","updated":"2018-07-10 01:51:53.000000000","message":"Hi Dharmendra,\n\nThis is a positive test and if we don\u0027t have minimum of two compute nodes, this test will never pass hence we have introduced this check to skip the test.\n\nWe can make changes to the test as suggested by you so that if we find both the instances on the same compute host, we can fail this test with an appropriate error message. But in nova, there is a known issue that anti-affinity doesn\u0027t work on multiple-cells [1]. So if the zuul job installs nova in multi-cells environment, even in that case, this test will fail.\n\nWe will need to install nova using devstack with CELLSV2_SETUP\u003d\"singleconductor\" instead of \"superconductor\" in order to pass this unit test.\n\n\n[1] : https://docs.openstack.org/nova/pike/user/cellsv2_layout.html#operations-requiring-upcalls","commit_id":"e9a80e27921cab37966a93d7da20272c5f1026da"},{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"a04ad88eb75334a6cf6aae8def8b1f3454ef7068","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # skip the test if environment doesn\u0027t have multi compute nodes"},{"line_number":96,"context_line":"        compute_hosts \u003d self.novaclient().hypervisors.list()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        @unittest.skipIf(len(compute_hosts) \u003c\u003d 1, \"Environment don\u0027t have \""},{"line_number":99,"context_line":"                                                  \"multi-compute nodes.\")"},{"line_number":100,"context_line":"        def execute_anti_affinity_test():"},{"line_number":101,"context_line":"            self._test_create_delete_vnf("},{"line_number":102,"context_line":"                vnf_name\u003d\u0027test_vnf_with_placement_policy_anti_affinity\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_6df53951","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":73},"in_reply_to":"5f7c97a3_1f370fb2","updated":"2018-07-12 05:05:22.000000000","message":"I agree with Dharmendra.\nIMO, we should not skip this test even if there is not multi-compute environment. We should test if the second vdu fails to boot in case of single-compute environment.","commit_id":"e9a80e27921cab37966a93d7da20272c5f1026da"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"2bdf8c2654c663d8c2fa5ad01f35c63ee54a909a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # skip the test if environment doesn\u0027t have multi compute nodes"},{"line_number":96,"context_line":"        compute_hosts \u003d self.novaclient().hypervisors.list()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        @unittest.skipIf(len(compute_hosts) \u003c\u003d 1, \"Environment don\u0027t have \""},{"line_number":99,"context_line":"                                                  \"multi-compute nodes.\")"},{"line_number":100,"context_line":"        def execute_anti_affinity_test():"},{"line_number":101,"context_line":"            self._test_create_delete_vnf("},{"line_number":102,"context_line":"                vnf_name\u003d\u0027test_vnf_with_placement_policy_anti_affinity\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_ad628814","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":73},"in_reply_to":"5f7c97a3_a6dad046","updated":"2018-07-11 10:22:12.000000000","message":"I agree there is a bug in nova side for anti-affinity.\nBut we should test like below:\n1: We should have both type of test cases:\n    1: For multi-node (Positive test case): as per your current code.\n    2: For single node (Negative test): checking the second VDU fails to boot.\n   \n2: We should add check for presence of \"ServerGroupAntiAffinityFilter\" scheduler filter on nova side, because if this filter is not enable on nova then anti-affinity will not work. So we needs to add test config option corresponding to this.","commit_id":"e9a80e27921cab37966a93d7da20272c5f1026da"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"a5e1c10f0a23e605f1ebedc7505e9ed5185b1821","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # skip the test if environment doesn\u0027t have multi compute nodes"},{"line_number":96,"context_line":"        compute_hosts \u003d self.novaclient().hypervisors.list()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        @unittest.skipIf(len(compute_hosts) \u003c\u003d 1, \"Environment don\u0027t have \""},{"line_number":99,"context_line":"                                                  \"multi-compute nodes.\")"},{"line_number":100,"context_line":"        def execute_anti_affinity_test():"},{"line_number":101,"context_line":"            self._test_create_delete_vnf("},{"line_number":102,"context_line":"                vnf_name\u003d\u0027test_vnf_with_placement_policy_anti_affinity\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_1f370fb2","line":99,"range":{"start_line":98,"start_character":8,"end_line":99,"end_character":73},"in_reply_to":"5f7c97a3_ad628814","updated":"2018-07-12 03:40:26.000000000","message":"\u003e\u003e For multi-node (Positive test case): as per your current code.\nThis multinode job should deploy 2 compute nodes in a single cell (nova) then only the test will pass. I will work on adding single cell support in multi-node job [1].\n\n\u003e\u003e For single node (Negative test): checking the second VDU fails to boot.\nThis single node job should use single cell (nova) then only the test will pass. I will work on adding single cell support in the existing tacker-functional-devstack job.\n\n\u003e\u003e We should add check for presence of \"ServerGroupAntiAffinityFilter\" scheduler filter on nova side\nBy default this filter is enabled in nova.\n\n[1] : https://review.openstack.org/#/c/578170/24","commit_id":"e9a80e27921cab37966a93d7da20272c5f1026da"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"079058f9aba207edb126353171eaff6e311f150b","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            if vnf_expected_status \u003d\u003d \"ERROR\":"},{"line_number":88,"context_line":"                # Check one of the VM should be in \"ERROR\" status"},{"line_number":89,"context_line":"                # and instance host should be None."},{"line_number":90,"context_line":"                self.assertIn(\"ERROR\", vm_statuses)"},{"line_number":91,"context_line":"                self.assertIn(None, compute_hosts)"},{"line_number":92,"context_line":"            else:"},{"line_number":93,"context_line":"                distinct_comp_hosts \u003d set(compute_hosts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_da2ec540","line":90,"range":{"start_line":90,"start_character":39,"end_line":90,"end_character":50},"updated":"2018-07-20 05:02:23.000000000","message":"It seems test on line #114 still failing, and its because of empty vm_statuses.\nKindly verify the same.","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"e1e9cd19d53c2bc33eb9e501ea3023df1340dde7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            if vnf_expected_status \u003d\u003d \"ERROR\":"},{"line_number":88,"context_line":"                # Check one of the VM should be in \"ERROR\" status"},{"line_number":89,"context_line":"                # and instance host should be None."},{"line_number":90,"context_line":"                self.assertIn(\"ERROR\", vm_statuses)"},{"line_number":91,"context_line":"                self.assertIn(None, compute_hosts)"},{"line_number":92,"context_line":"            else:"},{"line_number":93,"context_line":"                distinct_comp_hosts \u003d set(compute_hosts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_c587c611","line":90,"range":{"start_line":90,"start_character":39,"end_line":90,"end_character":50},"in_reply_to":"5f7c97a3_da2ec540","updated":"2018-07-20 06:33:14.000000000","message":"This test is failing due to the heat issue. I have fixed the issue in the below patch[1].\n\n[1] : https://review.openstack.org/#/c/583821/","commit_id":"047ec5aeee6209ec742d4eac6051a368dafdf400"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"2562d7c5e6d511e84cb115f1d12d67f6d0826c75","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            for vnf in compute_hosts:"},{"line_number":83,"context_line":"                self.assertEqual(compute_host, vnf)"},{"line_number":84,"context_line":"        elif placement_policy \u003d\u003d \u0027anti-affinity\u0027:"},{"line_number":85,"context_line":"            if vnf_expected_status \u003d\u003d \"ERROR\":"},{"line_number":86,"context_line":"                # Check one of the VM should be in \"ERROR\" status"},{"line_number":87,"context_line":"                # and instance host should be None."},{"line_number":88,"context_line":"                self.assertIn(\"ERROR\", vm_statuses)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_f6f9da4e","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":45},"updated":"2018-07-26 09:03:35.000000000","message":"In case of anti-affinity test(line#101), it seems VNF created successfully and not going in Error state so this condition is not being checked.\nIs it ok?\n\nPlease see the below logs in file---\u003e http://logs.openstack.org/45/570845/20/check/tacker-functional-devstack-multinode/4cf34a5/controller/logs/screen-tacker.txt.gz\n\n\n\nJul 26 07:56:31.846184 ubuntu-xenial-ovh-bhs1-0000978020 tacker-server[17360]: 2018-07-26 07:56:31.845 DEBUG tacker.db.vnfm.vnfm_db [req-3e5949ae-60ec-45fb-aed7-7063c05d7d6e nfv_user nfv] vnf_db \u003ctacker.db.vnfm.vnfm_db.VNF[object at 7fc45c5ddc90] {tenant_id\u003du\u0027ab541f6d36364d968d91c4b3e913c7d4\u0027, id\u003du\u0027967ecc4e-1a67-48d7-ab18-e37be679776a\u0027, created_at\u003ddatetime.datetime(2018, 7, 26, 7, 55, 56), updated_at\u003dNone, deleted_at\u003ddatetime.datetime(1, 1, 1, 0, 0), vnfd_id\u003du\u0027454d0808-ec14-49f2-a70d-b46a57d4aaa9\u0027, name\u003du\u0027test_vnf_with_placement_policy_anti_affinity\u0027, description\u003du\u0027Demo example\u0027, instance_id\u003du\u00279b7873aa-9e4c-4b42-aa89-1b89451725ef\u0027, mgmt_url\u003du\u0027{\"VDU1\": \"192.168.120.4\", \"VDU2\": \"192.168.120.3\"}\u0027, status\u003du\u0027ACTIVE\u0027, vim_id\u003du\u0027949042fb-eab1-466f-8fa5-867a82e767ae\u0027, placement_attr\u003d{u\u0027vim_name\u0027: u\u0027VIM0\u0027}, error_reason\u003dNone}\u003e _make_vnf_dict /opt/stack/tacker/tacker/db/vnfm/vnfm_db.py:220","commit_id":"f47bf1ba328b7e06cbca155ac17fda9d1fe64469"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"48e7b4fba73f446d7363d4868743deb3b44116de","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            for vnf in compute_hosts:"},{"line_number":83,"context_line":"                self.assertEqual(compute_host, vnf)"},{"line_number":84,"context_line":"        elif placement_policy \u003d\u003d \u0027anti-affinity\u0027:"},{"line_number":85,"context_line":"            if vnf_expected_status \u003d\u003d \"ERROR\":"},{"line_number":86,"context_line":"                # Check one of the VM should be in \"ERROR\" status"},{"line_number":87,"context_line":"                # and instance host should be None."},{"line_number":88,"context_line":"                self.assertIn(\"ERROR\", vm_statuses)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_1e20289a","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":45},"in_reply_to":"5f7c97a3_4026bfbb","updated":"2018-07-26 12:12:19.000000000","message":"Then looks fine","commit_id":"f47bf1ba328b7e06cbca155ac17fda9d1fe64469"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"e03b3a057c4de00717702163c2c56fbbf8400394","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            for vnf in compute_hosts:"},{"line_number":83,"context_line":"                self.assertEqual(compute_host, vnf)"},{"line_number":84,"context_line":"        elif placement_policy \u003d\u003d \u0027anti-affinity\u0027:"},{"line_number":85,"context_line":"            if vnf_expected_status \u003d\u003d \"ERROR\":"},{"line_number":86,"context_line":"                # Check one of the VM should be in \"ERROR\" status"},{"line_number":87,"context_line":"                # and instance host should be None."},{"line_number":88,"context_line":"                self.assertIn(\"ERROR\", vm_statuses)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_4026bfbb","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":45},"in_reply_to":"5f7c97a3_cd6c4807","updated":"2018-07-26 10:33:49.000000000","message":"Agree with gongysh.\n\nTest \"test_vnf_with_placement_policy_anti_affinity\" should create VNF successfully because we have two compute nodes in the nova environment, whereas test \"test_vnf_with_policy_anti_affinity_insufficient_comp_nodes\" should fail to create VNF because it expects three compute nodes in the nova environment.","commit_id":"f47bf1ba328b7e06cbca155ac17fda9d1fe64469"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"6b603dbffdc1d7872de26ba40e495ae2451196ee","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            for vnf in compute_hosts:"},{"line_number":83,"context_line":"                self.assertEqual(compute_host, vnf)"},{"line_number":84,"context_line":"        elif placement_policy \u003d\u003d \u0027anti-affinity\u0027:"},{"line_number":85,"context_line":"            if vnf_expected_status \u003d\u003d \"ERROR\":"},{"line_number":86,"context_line":"                # Check one of the VM should be in \"ERROR\" status"},{"line_number":87,"context_line":"                # and instance host should be None."},{"line_number":88,"context_line":"                self.assertIn(\"ERROR\", vm_statuses)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5f7c97a3_cd6c4807","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":45},"in_reply_to":"5f7c97a3_f6f9da4e","updated":"2018-07-26 10:27:34.000000000","message":"I  think it is for line 108 case.","commit_id":"f47bf1ba328b7e06cbca155ac17fda9d1fe64469"}],"tacker/tests/unit/vnfm/infra_drivers/openstack/data/hot_placement_policy_anti_affinity.yaml":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"378cf2b5c27dfdd128529464f8cfc5163d8be9a0","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  my_compute_placement_policy:"},{"line_number":35,"context_line":"    type: OS::Nova::ServerGroup"},{"line_number":36,"context_line":"    properties:"},{"line_number":37,"context_line":"      name: my_compute_placement_policy"},{"line_number":38,"context_line":"      policies: [anti-affinity]"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_d51306b7","line":37,"range":{"start_line":37,"start_character":12,"end_line":37,"end_character":39},"updated":"2018-06-26 03:41:45.000000000","message":"what willl happen if the target openstack has already this group?\nand what will happen if the target openstack has not already it?","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"e2a505bbf16ff00430422460254a831f1a5309c2","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  my_compute_placement_policy:"},{"line_number":35,"context_line":"    type: OS::Nova::ServerGroup"},{"line_number":36,"context_line":"    properties:"},{"line_number":37,"context_line":"      name: my_compute_placement_policy"},{"line_number":38,"context_line":"      policies: [anti-affinity]"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_9de130ff","line":37,"range":{"start_line":37,"start_character":12,"end_line":37,"end_character":39},"in_reply_to":"5f7c97a3_d51306b7","updated":"2018-06-26 08:40:00.000000000","message":"What happens if the target OpenStack has already the server_group created:\n* Heat creates a new server_group every time if you use the same template for creating multiple VNF\u0027s. The server_groups gets created with same name but with different ID\u0027s. Heat binds the respective server_group with the VNF. Hence when we delete the VNF it deletes the corresponding server_group too.\n\n\n\nWhat happens if the target OpenStack doesn\u0027t have the server_group already created:\n* It creates a new server_group for that VNF irrespective server_group with same name exists in nova or not.","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"}],"tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_placement_policy_affinity.yaml":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"378cf2b5c27dfdd128529464f8cfc5163d8be9a0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"        image: cirros-0.3.5-x86_64-disk"},{"line_number":19,"context_line":"        mgmt_driver: noop"},{"line_number":20,"context_line":"        availability_zone: nova"},{"line_number":21,"context_line":"        metadata: {metering.vnf: SG1}"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    CP1:"},{"line_number":24,"context_line":"      type: tosca.nodes.nfv.CP.Tacker"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_15c17e2f","line":21,"range":{"start_line":21,"start_character":8,"end_line":21,"end_character":37},"updated":"2018-06-26 03:41:45.000000000","message":"do we need this data?","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"e2a505bbf16ff00430422460254a831f1a5309c2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"        image: cirros-0.3.5-x86_64-disk"},{"line_number":19,"context_line":"        mgmt_driver: noop"},{"line_number":20,"context_line":"        availability_zone: nova"},{"line_number":21,"context_line":"        metadata: {metering.vnf: SG1}"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    CP1:"},{"line_number":24,"context_line":"      type: tosca.nodes.nfv.CP.Tacker"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_7da2149c","line":21,"range":{"start_line":21,"start_character":8,"end_line":21,"end_character":37},"in_reply_to":"5f7c97a3_15c17e2f","updated":"2018-06-26 08:40:00.000000000","message":"Done","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"378cf2b5c27dfdd128529464f8cfc5163d8be9a0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"          policy: affinity"},{"line_number":45,"context_line":"          strict: true"},{"line_number":46,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":47,"context_line":"        targets: [ VDU1 ]"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_1555fe1d","line":47,"range":{"start_line":47,"start_character":19,"end_line":47,"end_character":23},"updated":"2018-06-26 03:41:45.000000000","message":"it is interesting here.  who is along with who in affinity if there is only one target?","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"e2a505bbf16ff00430422460254a831f1a5309c2","unresolved":false,"context_lines":[{"line_number":44,"context_line":"          policy: affinity"},{"line_number":45,"context_line":"          strict: true"},{"line_number":46,"context_line":"        description: Apply my placement policy to my applications servers"},{"line_number":47,"context_line":"        targets: [ VDU1 ]"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_9d9db058","line":47,"range":{"start_line":47,"start_character":19,"end_line":47,"end_character":23},"in_reply_to":"5f7c97a3_1555fe1d","updated":"2018-06-26 08:40:00.000000000","message":"Done","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"}],"tacker/tests/unit/vnfm/infra_drivers/openstack/data/tosca_placement_policy_default_affinity.yaml":[{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"cb83ec370bbc1bea306ebdfb3a4931f4bd6d4c36","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  policies:"},{"line_number":60,"context_line":"    - my_compute_placement_policy:"},{"line_number":61,"context_line":"        type: tosca.policies.tacker.Placement"},{"line_number":62,"context_line":"        description: Apply defauly placement policy to the application servers"},{"line_number":63,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5f7c97a3_987919c8","line":62,"range":{"start_line":62,"start_character":27,"end_line":62,"end_character":34},"updated":"2018-07-23 02:10:37.000000000","message":"nit: default","commit_id":"9fb1d5f780d6433dc2f2758edd6454b1b9c089e9"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"426290c2e6e07ee4daa6434745c912a40f26f000","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  policies:"},{"line_number":60,"context_line":"    - my_compute_placement_policy:"},{"line_number":61,"context_line":"        type: tosca.policies.tacker.Placement"},{"line_number":62,"context_line":"        description: Apply defauly placement policy to the application servers"},{"line_number":63,"context_line":"        targets: [ VDU1, VDU2 ]"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"5f7c97a3_7e274068","line":62,"range":{"start_line":62,"start_character":27,"end_line":62,"end_character":34},"in_reply_to":"5f7c97a3_987919c8","updated":"2018-07-23 04:48:06.000000000","message":"Done","commit_id":"9fb1d5f780d6433dc2f2758edd6454b1b9c089e9"}],"tacker/tosca/lib/tacker_defs.yaml":[{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"f3d263333068d85b2f5a1a2dfb0f542e8f08e73d","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        type: boolean"},{"line_number":216,"context_line":"        required: false"},{"line_number":217,"context_line":"        default: true"},{"line_number":218,"context_line":"        description: If the policy is not mandatory, it is allowed to continue even if the nova-scheduler fails to assign compute hosts under the policy."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"  tosca.policies.tacker.Failure:"},{"line_number":221,"context_line":"    derived_from: tosca.policies.Root"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_2a5423fe","line":218,"range":{"start_line":218,"start_character":51,"end_line":218,"end_character":52},"updated":"2018-06-04 07:10:09.000000000","message":", set this flag to \"false\". Then,","commit_id":"ec3142664cbdc3f441de4163fc90decfb312ec8b"},{"author":{"_account_id":27181,"name":"lijiale","email":"lijiale_yewu@cmss.chinamobile.com","username":"lijiale"},"change_message_id":"c7b028a159f6e4b0f37105732d880594e1ac3c98","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"policy_types:"},{"line_number":203,"context_line":"  tosca.policies.tacker.Placement:"},{"line_number":204,"context_line":"    derived_from: tosca.policies.Placement"},{"line_number":205,"context_line":"    description: Defines policy for placement of VDU\u0027s."},{"line_number":206,"context_line":"    properties:"},{"line_number":207,"context_line":"      policy:"},{"line_number":208,"context_line":"        type: string"},{"line_number":209,"context_line":"        required: false"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_f09730ea","line":206,"range":{"start_line":204,"start_character":0,"end_line":206,"end_character":14},"updated":"2018-06-26 05:02:26.000000000","message":"where is \"targets\"? need to define it ?","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"e2a505bbf16ff00430422460254a831f1a5309c2","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"policy_types:"},{"line_number":203,"context_line":"  tosca.policies.tacker.Placement:"},{"line_number":204,"context_line":"    derived_from: tosca.policies.Placement"},{"line_number":205,"context_line":"    description: Defines policy for placement of VDU\u0027s."},{"line_number":206,"context_line":"    properties:"},{"line_number":207,"context_line":"      policy:"},{"line_number":208,"context_line":"        type: string"},{"line_number":209,"context_line":"        required: false"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_ddb008df","line":206,"range":{"start_line":204,"start_character":0,"end_line":206,"end_character":14},"in_reply_to":"5f7c97a3_f09730ea","updated":"2018-06-26 08:40:00.000000000","message":"No, here only policy properties are defined.","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"378cf2b5c27dfdd128529464f8cfc5163d8be9a0","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        type: string"},{"line_number":209,"context_line":"        required: false"},{"line_number":210,"context_line":"        constraints:"},{"line_number":211,"context_line":"          - valid_values: [ affinity, anti-affinity ]"},{"line_number":212,"context_line":"        default: affinity"},{"line_number":213,"context_line":"        description: Placement policy for target VDU\u0027s."},{"line_number":214,"context_line":"      strict:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_356efa63","line":211,"range":{"start_line":211,"start_character":28,"end_line":211,"end_character":36},"updated":"2018-06-26 03:41:45.000000000","message":"what about soft parts? why not just use policy: soft-affinity, affinity etc, instead of using two properties to do it?","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"e2a505bbf16ff00430422460254a831f1a5309c2","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        type: string"},{"line_number":209,"context_line":"        required: false"},{"line_number":210,"context_line":"        constraints:"},{"line_number":211,"context_line":"          - valid_values: [ affinity, anti-affinity ]"},{"line_number":212,"context_line":"        default: affinity"},{"line_number":213,"context_line":"        description: Placement policy for target VDU\u0027s."},{"line_number":214,"context_line":"      strict:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f7c97a3_3d449cb7","line":211,"range":{"start_line":211,"start_character":28,"end_line":211,"end_character":36},"in_reply_to":"5f7c97a3_356efa63","updated":"2018-06-26 08:40:00.000000000","message":"This is already approved in the spec:\nhttps://review.openstack.org/#/c/563844/5/specs/rocky/vdu-affinity-policy.rst\n\nAccording to the document [1] the supported placement policies are affinity and anti-affinity only. OpenStack is the one which supports 4 types of policies: [affinity, anti-affinity, soft-affinity, soft-anti-affinity].\nTo maintain the consistency over all the supporting tacker ``infra-drivers`` this ``strict`` flag has been added.\n\n[1] Section 12.3: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/csprd02/TOSCA-Simple-Profile-YAML-v1.1-csprd02.pdf","commit_id":"8e0b56fa250c26fc6c4ba1f65ebc1c297c5429ee"}]}
