)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"452ece38ffd00006cf6965ef691532658a7cb5b7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Graph cluster model implementation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint graph-based-cluster-model"},{"line_number":10,"context_line":"Change-Id: I2ba0513aacca884540bc0f8f6d49d6b2488b8eaa"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a8bc5a2_fd7ad575","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":10},"updated":"2016-09-27 15:38:39.000000000","message":"you\u0027re implementation takes into account only nova resources.\nBut in your spec, you wrote about networking resources as well. So your changeset is a partial implementation of this bp.","commit_id":"f603f43f3ca65177f6b6dd2260451ae390e205f7"},{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"452ece38ffd00006cf6965ef691532658a7cb5b7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"5a8bc5a2_1d7061a3","line":11,"updated":"2016-09-27 15:38:39.000000000","message":"add doc impact flag","commit_id":"f603f43f3ca65177f6b6dd2260451ae390e205f7"}],"watcher/decision_engine/cluster/graph/cluster_graph.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"The cluster graph represents the cluster model as a graph. With all data"},{"line_number":18,"context_line":" including resources modelled inside the graph."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import abc"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_b9dd7c44","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":1},"updated":"2016-09-06 08:53:00.000000000","message":"nit: extra whitespace","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import abc"},{"line_number":22,"context_line":"import networkx as nx"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class ClusterGraph(nx.DiGraph):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_4f8f5923","line":22,"updated":"2016-09-06 08:53:00.000000000","message":"\u0027abc\u0027 is a buitlin module whereas networkx isn\u0027t, so as stated in http://docs.openstack.org/developer/hacking/#imports , could you add a blank line between the two?","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class ClusterGraph(nx.DiGraph):"},{"line_number":26,"context_line":"    \"\"\"Base class for a cluster graph.\"\"\""},{"line_number":27,"context_line":"    __metaclass__ \u003d abc.ABCMeta"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    @abc.abstractmethod"},{"line_number":30,"context_line":"    def populate_graph(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_583c7893","line":27,"updated":"2016-09-06 08:53:00.000000000","message":"nit: in order to maintain some consistence with the rest of the codebase, can you please use the metaclass notation used in https://github.com/openstack/watcher/blob/master/watcher/decision_engine/goal/base.py#L17-L24 please? This will also ensure that things will work for both python 2.7 and python 3.4","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    @abc.abstractmethod"},{"line_number":30,"context_line":"    def populate_graph(self):"},{"line_number":31,"context_line":"        \"\"\"Populates the graph with all of the cluster data. This includes"},{"line_number":32,"context_line":"        building the nodes, adding attributes and forming the connections"},{"line_number":33,"context_line":"        between the nodes."},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_a449ec8d","line":32,"updated":"2016-09-06 08:53:00.000000000","message":"Jenkins fails here because it expects a blank line between the title (i.e. the first line of the docstring) and the rest.\n\nSo this should look something like:\n\ndef populate_graph(self):\n    \"\"\"Populates the graph with all of the cluster data.\n\n    This includes building the nodes, adding attributes\n    and forming the connections between the nodes.\n    \"\"\"\n\n\nNote: this will also fail if your title is exceeding 1 line even if you add a blank space to separate it from the rest.","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    @abc.abstractmethod"},{"line_number":63,"context_line":"    def subgraph(self, stack_id):"},{"line_number":64,"context_line":"        \"\"\"Returns a subgraph of a stack. Given the stack id a subgraph including"},{"line_number":65,"context_line":"        all nodes and relationships associated with that stack are returned."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        :param stack_id: The uuid of the stack."},{"line_number":68,"context_line":"        :return: A subgraph of type ClusterGraph."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_6f797d93","line":65,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"58469d51a1860a1baba87e7acfeb1b89fb5dacc5","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import abc"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import networkx as nx"},{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a8bc5a2_c36373af","line":23,"range":{"start_line":23,"start_character":7,"end_line":23,"end_character":21},"updated":"2016-09-28 10:11:05.000000000","message":"this is a new requirement so can you add it into requirements.txt?","commit_id":"f603f43f3ca65177f6b6dd2260451ae390e205f7"}],"watcher/decision_engine/cluster/graph/openstack_cg.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Openstack implementation of the cluster graph."},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":"import time"},{"line_number":21,"context_line":"from watcher.decision_engine.cluster.graph.cluster_graph import ClusterGraph"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_8fe8817e","line":21,"range":{"start_line":19,"start_character":0,"end_line":21,"end_character":76},"updated":"2016-09-06 08:53:00.000000000","message":"ditto on import formatting, it should look like:\n\nimport time\n\nfrom oslo_log import log\n\nfrom watcher.decision_engine.cluster.graph import cluster_graph\n\n[...]\n\nclass OpenstackClusterGraph(cluster_graph.ClusterGraph):\n    [...]","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def populate_graph(self):"},{"line_number":41,"context_line":"        \"\"\"The graph is populated along three layers, service, virtual and"},{"line_number":42,"context_line":"        physical. As each new layer is built connections are made back to"},{"line_number":43,"context_line":"        previous layers."},{"line_number":44,"context_line":"        \"\"\""},{"line_number":45,"context_line":"        LOG.debug(\"Building Cluster Graph\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_8f6ec1c7","line":42,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def subgraph(self, stk_id):"},{"line_number":84,"context_line":"        \"\"\"Returns a subgraph of a stack. Given the stack id a subgraph including"},{"line_number":85,"context_line":"        all nodes and relationships associated with that stack are returned."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        :param stack_id: The uuid of the stack."},{"line_number":88,"context_line":"        :return: A subgraph of type OpenstackClusterGraph."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_cfafe9e1","line":85,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def _traverse(self, node_id, subgraph):"},{"line_number":96,"context_line":"        \"\"\"Recursively traverses through the graph. Adds nodes on the way down"},{"line_number":97,"context_line":"        through the graph and connects them to previous nodes on the way back"},{"line_number":98,"context_line":"        up. Depth first."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        :param node_id: The node that should be added. This node is then used"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_6f87bd61","line":97,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _add_physical_layer(self):"},{"line_number":125,"context_line":"        \"\"\"Add the physical layer of the graph. This includes components which"},{"line_number":126,"context_line":"        represent actual infrastructure hardware."},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        # add hypervisors"},{"line_number":129,"context_line":"        hypervisors \u003d self.nova.hypervisors.list()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_af81c54c","line":126,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        # add hypervisors"},{"line_number":129,"context_line":"        hypervisors \u003d self.nova.hypervisors.list()"},{"line_number":130,"context_line":"        for hypervisor in hypervisors:"},{"line_number":131,"context_line":"            hyp_id, hyp_attributes \u003d self._build_hypervisor_node(hypervisor)"},{"line_number":132,"context_line":"            self.add_node(hyp_id, hyp_attributes)"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_76e5c835","line":130,"range":{"start_line":130,"start_character":12,"end_line":130,"end_character":22},"updated":"2016-09-06 08:53:00.000000000","message":"nit: following a recent refactoring, we try to use the term \"compute node\" or simply \"node\" to refer to nova hypervisors and we also use the term \"instance\" to refer to a VM/server","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def _add_virtual_layer(self):"},{"line_number":135,"context_line":"        \"\"\"Add the virtual layer to the graph. This layer is the virtual"},{"line_number":136,"context_line":"        components of the infrastructure, such as vms."},{"line_number":137,"context_line":"        \"\"\""},{"line_number":138,"context_line":"        all_vms \u003d self.nova.servers.list(search_opts\u003d{\u0027all_tenants\u0027: 1})"},{"line_number":139,"context_line":"        for virtual_machine in all_vms:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_ef93cda1","line":136,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _add_service_layer(self):"},{"line_number":153,"context_line":"        \"\"\"Add the service layer components to the graph. Currently there is only"},{"line_number":154,"context_line":"        one component in the service layer, the openstack heat stack node. This"},{"line_number":155,"context_line":"        node is the highest point for a service structure and is connected to"},{"line_number":156,"context_line":"        all virtual components which are described in the stack."},{"line_number":157,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_0f91d199","line":154,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def _build_hypervisor_node(self, hypervisor):"},{"line_number":171,"context_line":"        \"\"\"Builds the hypervisor node for the graph using nova and the hypervisor"},{"line_number":172,"context_line":"        nova object provided."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        :param hypervisor: Nova hypervisor object."},{"line_number":175,"context_line":"        :return: A hypervisor node for the graph."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_4fe9191a","line":172,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _build_vm_node(self, virtual_machine):"},{"line_number":195,"context_line":"        \"\"\"Builds a vm node for the graph using nova and the vm nova object"},{"line_number":196,"context_line":"        provided."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        :param virtual_machine: Nova VM object."},{"line_number":199,"context_line":"        :return: A vm node for the graph."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_8ff3210a","line":196,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    @staticmethod"},{"line_number":217,"context_line":"    def _build_stack_node(stack):"},{"line_number":218,"context_line":"        \"\"\"Builds the hypervisor node for the graph using nova and the hypervisor"},{"line_number":219,"context_line":"        nova object provided."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        :param hypervisor: Nova hypervisor object."},{"line_number":222,"context_line":"        :return: A hypervisor node for the graph."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_af11c5ae","line":219,"updated":"2016-09-06 08:53:00.000000000","message":"ditto on docstring formatting","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":12813,"name":"Rong Han","email":"han.rong3@zte.com.cn","username":"hanrong-zte"},"change_message_id":"527583f2d33ba7df67769d15f62cf329f18780a7","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        :return: VM ids for all of the vms on a given stack."},{"line_number":243,"context_line":"        \"\"\""},{"line_number":244,"context_line":"        stack_resources \u003d self.heat.resources.list(stack_id)"},{"line_number":245,"context_line":"        v_machines \u003d []"},{"line_number":246,"context_line":"        for resource in stack_resources:"},{"line_number":247,"context_line":"            if resource.resource_type \u003d\u003d \"OS::Nova::Server\":"},{"line_number":248,"context_line":"                vm_id \u003d resource.physical_resource_id"},{"line_number":249,"context_line":"                v_machines.append(vm_id)"},{"line_number":250,"context_line":"        return v_machines"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_9405717b","line":250,"range":{"start_line":245,"start_character":9,"end_line":250,"end_character":25},"updated":"2016-09-07 13:36:28.000000000","message":"return [resource.physical_resource_id for resource in stack_resources if resource.resource_type \u003d\u003d \"OS::Nova::Server\"]","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"b8c0fcb01ab86a347e64365f9d20de68e92d347f","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        return memory_id, memory_node"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def build_cpu_compute_node(self, base_node, compute):"},{"line_number":155,"context_line":"        # Build memory node attributes."},{"line_number":156,"context_line":"        cpu_attributes \u003d {\"vcpus\": compute.vcpus,"},{"line_number":157,"context_line":"                          \"vcpus_used\": compute.vcpus_used,"},{"line_number":158,"context_line":"                          \"info\": jsonutils.loads(compute.cpu_info)}"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5201f7_83440c4a","line":155,"range":{"start_line":155,"start_character":16,"end_line":155,"end_character":22},"updated":"2017-01-07 03:41:21.000000000","message":"s/memory/cpu","commit_id":"ff024837b03b6f2ba64bf612971f8cbae1e6a5df"}],"watcher/decision_engine/model/collector/graph.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Openstack implementation of the cluster model collector with the cluster graph"},{"line_number":17,"context_line":"included."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"# from oslo_log import log"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from watcher.decision_engine.cluster.graph import openstack_cg as ocg"},{"line_number":22,"context_line":"from watcher.decision_engine.model.collector import base"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_cf4b692a","line":19,"updated":"2016-09-06 08:53:00.000000000","message":"nit: can you remove this comment please?","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"7c665fedcd3ce0c9b8e1e7e68cb0e8e73e109720","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        :return: An up-to-date cluster model."},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        # LOG.debug(\"Getting latest cluster model\")"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        # Initialise and populate the graph."},{"line_number":43,"context_line":"        graph \u003d ocg.OpenstackClusterGraph(self.osc)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_2f6a1581","line":40,"updated":"2016-09-06 08:53:00.000000000","message":"can you either remove or uncomment this log?","commit_id":"9b97c29ce63fc4b59aef51aaedf0544c03cd2247"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"58469d51a1860a1baba87e7acfeb1b89fb5dacc5","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from watcher.decision_engine.model import model_root"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class GraphClusterModelCollector(base.BaseClusterDataModelCollector):"},{"line_number":27,"context_line":"    \"\"\"Openstack implementation of the cluster model collector.\"\"\""},{"line_number":28,"context_line":"    def __init__(self, config, osc):"},{"line_number":29,"context_line":"        super(GraphClusterModelCollector, self).__init__(config, osc)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a8bc5a2_c701963b","line":26,"updated":"2016-09-28 10:11:05.000000000","message":"This cluster data model is not registered in setup.cfg as being a cluster data model plugin (see http://docs.openstack.org/developer/watcher/dev/plugin/cdmc-plugin.html#register-a-new-entry-point)","commit_id":"f603f43f3ca65177f6b6dd2260451ae390e205f7"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"58469d51a1860a1baba87e7acfeb1b89fb5dacc5","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        graph \u003d ocg.OpenstackClusterGraph(self.osc)"},{"line_number":39,"context_line":"        graph.populate_graph()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        # Create cluster resources."},{"line_number":42,"context_line":"        cluster \u003d model_root.ModelRoot()"},{"line_number":43,"context_line":"        cluster.graph \u003d graph"},{"line_number":44,"context_line":"        mem \u003d element.Resource(element.ResourceType.memory)"},{"line_number":45,"context_line":"        num_cores \u003d element.Resource(element.ResourceType.cpu_cores)"},{"line_number":46,"context_line":"        disk \u003d element.Resource(element.ResourceType.disk)"},{"line_number":47,"context_line":"        disk_capacity \u003d element.Resource(element.ResourceType.disk_capacity)"},{"line_number":48,"context_line":"        cluster.create_resource(mem)"},{"line_number":49,"context_line":"        cluster.create_resource(num_cores)"},{"line_number":50,"context_line":"        cluster.create_resource(disk)"},{"line_number":51,"context_line":"        cluster.create_resource(disk_capacity)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Create cluster hypervisors, vms and their mapping to each other using"},{"line_number":54,"context_line":"        # the cluster graph."},{"line_number":55,"context_line":"        graph_hypervisors \u003d cluster.graph.get_hypervisor_nodes()"},{"line_number":56,"context_line":"        for graph_hypervisor in graph_hypervisors:"},{"line_number":57,"context_line":"            # Create a hypervisor object."},{"line_number":58,"context_line":"            hypervisor \u003d element.ComputeNode()"},{"line_number":59,"context_line":"            hypervisor.uuid \u003d graph_hypervisor.get(\u0027uuid\u0027)"},{"line_number":60,"context_line":"            hypervisor.hostname \u003d graph_hypervisor.get(\u0027hostname\u0027)"},{"line_number":61,"context_line":"            hypervisor.state \u003d graph_hypervisor.get(\u0027state\u0027)"},{"line_number":62,"context_line":"            hypervisor.status \u003d graph_hypervisor.get(\u0027status\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"            # Set the hypervisor capacities."},{"line_number":65,"context_line":"            mem.set_capacity(hypervisor, graph_hypervisor.get(\u0027memory\u0027))"},{"line_number":66,"context_line":"            disk.set_capacity(hypervisor, graph_hypervisor.get(\u0027disk\u0027))"},{"line_number":67,"context_line":"            graph_disk_capacity \u003d graph_hypervisor.get(\u0027disk_capacity\u0027)"},{"line_number":68,"context_line":"            disk_capacity.set_capacity(hypervisor, graph_disk_capacity)"},{"line_number":69,"context_line":"            num_cores.set_capacity(hypervisor, graph_hypervisor.get(\u0027cores\u0027))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"            # Add the hypervisor to the cluster."},{"line_number":72,"context_line":"            cluster.add_node(hypervisor)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"            # Create each VM object for the hypervisor."},{"line_number":75,"context_line":"            graph_vms \u003d cluster.graph.get_hypervisor_vms(hypervisor.uuid)"},{"line_number":76,"context_line":"            for graph_vm in graph_vms:"},{"line_number":77,"context_line":"                # create a VM object."},{"line_number":78,"context_line":"                virtual_machine \u003d element.Instance()"},{"line_number":79,"context_line":"                virtual_machine.uuid \u003d graph_vm.get(\"uuid\")"},{"line_number":80,"context_line":"                virtual_machine.state \u003d graph_vm.get(\u0027state\u0027)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"                # set the VM capacities."},{"line_number":83,"context_line":"                mem.set_capacity(virtual_machine, graph_vm.get(\u0027ram\u0027))"},{"line_number":84,"context_line":"                disk.set_capacity(virtual_machine, graph_vm.get(\u0027disk\u0027))"},{"line_number":85,"context_line":"                num_cores.set_capacity(virtual_machine, graph_vm.get(\u0027vcpus\u0027))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"                # Add VM and mapping to cluster."},{"line_number":88,"context_line":"                cluster.get_mapping().map(hypervisor, virtual_machine)"},{"line_number":89,"context_line":"                cluster.add_instance(virtual_machine)"},{"line_number":90,"context_line":"        return cluster"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a8bc5a2_674e0298","line":90,"range":{"start_line":41,"start_character":0,"end_line":90,"end_character":22},"updated":"2016-09-28 10:11:05.000000000","message":"Why are you doing this?\nIf I am not mistaken, the objective of this CDMC is to propose an alternative representation/model of the cluster that based on a graph structure. So IMHO, there is no need to also create the non-graph structure (i.e. ModelRoot).\n\nThese 2 models should be handled completely differently since their structure is essentially different and strategies relying on it will have to be aware of it.","commit_id":"f603f43f3ca65177f6b6dd2260451ae390e205f7"}]}
