Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2 : API to create new devices #2630

Closed
Raizo62 opened this issue Nov 19, 2018 · 2 comments
Closed

2.2 : API to create new devices #2630

Raizo62 opened this issue Nov 19, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@Raizo62
Copy link

Raizo62 commented Nov 19, 2018

Hi

Previously, i used the api of GNS3 and particulary "v2/settings" to create new device in running GNS3.

Now, GNS3 returns "404 : Not Found" when we call "v2/settings", and the doc says "Temporary will we removed in later release".

How can we create new device in GNS3 (not in the topolgy, but in the "server") with CLI ?

@grossmj grossmj self-assigned this Nov 19, 2018
@grossmj grossmj added this to the 2.2 milestone Nov 19, 2018
grossmj added a commit to GNS3/gns3-server that referenced this issue Nov 20, 2018
@grossmj
Copy link
Member

grossmj commented Nov 20, 2018

We have a new appliance management API. It is described in https://gns3-server.readthedocs.io/en/2.2/api/v2/controller/appliance.html

Basically, appliances can be added on the controller and then used to create nodes in your project.

Here is an example for a Qemu appliance:

curl -X POST "http://localhost:3080/v2/appliances" -d '{"name": "Qemu appliance", "compute_id": "local", "platform": "i386", "hda_disk_image": "IOSvL2-15.2.4.0.55E.qcow2", "ram": 512, "appliance_type": "qemu"}'
{
    "adapter_type": "e1000",
    "adapters": 1,
    "appliance_id": "ec785247-8e17-4660-b44e-d184895e40af",
    "appliance_type": "qemu",
    "bios_image": "",
    "boot_priority": "c",
    "builtin": false,
    "category": "guest",
    "cdrom_image": "",
    "compute_id": "local",
    "console_auto_start": false,
    "console_type": "telnet",
    "cpu_throttling": 0,
    "cpus": 1,
    "custom_adapters": [],
    "default_name_format": "{name}-{0}",
    "first_port_name": "",
    "hda_disk_image": "IOSvL2-15.2.4.0.55E.qcow2",
    "hda_disk_interface": "ide",
    "hdb_disk_image": "",
    "hdb_disk_interface": "ide",
    "hdc_disk_image": "",
    "hdc_disk_interface": "ide",
    "hdd_disk_image": "",
    "hdd_disk_interface": "ide",
    "initrd": "",
    "kernel_command_line": "",
    "kernel_image": "",
    "legacy_networking": false,
    "linked_clone": true,
    "mac_address": "",
    "name": "Qemu appliance",
    "on_close": "power_off",
    "options": "",
    "platform": "i386",
    "port_name_format": "Ethernet{0}",
    "port_segment_size": 0,
    "process_priority": "normal",
    "qemu_path": "",
    "ram": 512,
    "symbol": ":/symbols/qemu_guest.svg",
    "usage": ""
}

Then you can use this appliance to create a node in an existing project.

curl -X POST http://localhost:3080/v2/projects/b8c070f7-f34c-4b7b-ba6f-be3d26ed073f/appliances/ec785247-8e17-4660-b44e-d184895e40af -d '{"x": 12, "y": 42}'

All of this is still quite new and we hope to provide better documentation soon.

Let us know if you have comments.

@grossmj grossmj closed this as completed Nov 20, 2018
@Raizo62
Copy link
Author

Raizo62 commented Nov 20, 2018

Thank you very much :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants