Skip to content

Commit

Permalink
Drop the commit system
Browse files Browse the repository at this point in the history
Ref #1243
  • Loading branch information
julien-duponchelle committed Jun 14, 2016
1 parent 1d51f3e commit ec68deb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
9 changes: 0 additions & 9 deletions gns3/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,6 @@ def setTopologyFile(self, topology_file):
self.setFilesDir(os.path.dirname(topology_file))
self._name = os.path.basename(topology_file).replace('.gns3', '')

def commit(self):
"""Save project on remote servers"""

# Don't do anything if the project doesn't exist on the server
if self._id is None:
return

Controller.instance().post("/projects/{project_id}/commit".format(project_id=self._id), None, body={})

def start_all_nodes(self):
"""Start all nodes belonging to this project"""

Expand Down
1 change: 0 additions & 1 deletion gns3/project_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ def saveProject(self, path, random_id=False):
topology = Topology.instance()
topology.project = self._project
try:
self._project.commit()
topology = topology.dump(random_id=random_id)
log.info("Saving project: {}".format(path))
content = json.dumps(topology, sort_keys=True, indent=4)
Expand Down
15 changes: 0 additions & 15 deletions tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,6 @@ def test_project_delete_on_created_project(controller):
assert args[1] == "/projects/{uuid}/test".format(uuid=uuid)


def test_project_commit(controller):


project = Project()
project.setId(str(uuid4()))
project.commit()

mock = controller._http_client.createHTTPQuery
assert mock.called
args, kwargs = mock.call_args

assert args[0] == "POST"
assert args[1] == "/projects/{project_id}/commit".format(project_id=project.id())


def test_project_destroy(controller):


Expand Down

0 comments on commit ec68deb

Please sign in to comment.