GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.12k stars 433 forks source link

[2.0] "Create a new version" in a template expects specific file name for an image #2200

Open dmfigol opened 7 years ago

dmfigol commented 7 years ago

When I import a template and I want to add another image not currently present in the list, I use the button "Create a new version". However, after I specify a version name, GNS3 expects an image with specific format. Sometimes new image names are different than what GNS3 expects. This should not be like that. If this option is used, GNS3 should allow a user to upload an image with any file name. For example, cisco-csr1000v template from the marketplace. See screenshot below:

screen shot 2017-08-04 at 00 33 14
julien-duponchelle commented 7 years ago

Current implementation take the previous version and replace the version number by the new one. And this work without problem for most cases.

The problem is at this step we have no idea of the filename that the user will provide. We just create the new version.

And later the user will import the file. But at this step we always change the filename to use the one available in the appliance file. Because in theory the filename in appliance file is the best option.

We can probably improve it, but this require to rewrite the whole process.

But this option is a patch, to save you when an appliance is not available. The real solution is to add the new version in the .gns3a

dmfigol commented 7 years ago

@noplay Why does it matter what filename is provided? If a new version of the same appliance is created it means that it is not in the appliance file. I would expect GNS3 to take any filename now.

I agree and disagree that "The real solution is to add the new version in the .gns3a". It would be, if the process was very intuitive, but it is not. Currently you have to edit it manually. Developer-friendly? Yes. User-friendly? I don't think so.

julien-duponchelle commented 7 years ago

We need a unique filename to create the version before we create the version. And in the code create a version and import a file are two different area.

And we force the filename because it's enable portability of project by using a common naming scheme. And this avoid issue with user providing file with name: image.qcow2

The fact you don't have way to personnalise it when using custom image is a side effect.

Today the create new version button allow to unblock user. You can use a new version even if it's not supported. But this should be a temporary solution until someone provide a patch for the appliance.

Most appliances contributed are from network engineer, not from developers. It's just adding few lines to a JSON file. It's take time from someone to add support and will benefits to the whole community.

My point is I think today it's good enough for basic users. You can work with an appliance non supported. And it's too much work to improve it in order to properly manage the case of Cisco naming scheme. And if you are an advanced users that want a proper naming it's possible.

Changing the way it's work for handling this case require an heavy rewrite of all the appliance handling code. For me the efforts and risk to introduce bugs are too big versus the benefits of having proper image naming for non supported cisco image.

If we invest time, it should be on an in app appliance template editor with a way to submit it to GNS3 developers but it's weeks of work.

adosztal commented 5 years ago

Same problem: https://gns3.com/community/discussion/why-is-the-process-of-creating-a