Project

General

Profile

Actions

Bug #12866

closed

Can't update/create a subnet with a domain_id via api

Added by Marius Gebert almost 9 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

if i create a subnet via the API, the "domains" were not set. Even if i run a update via API.
Here is what i am doing to upgrade:

curl -X PUT http://user:password@foreman.url.de/api/subnets/187 -d '{"domain_ids": [261]}' -H "Content-Type:application/json" -H "Accept:application/json" 
{"network":"10.10.10.10","cidr":24,"mask":"255.255.255.0","priority":null,"vlanid":"200","gateway":"10.10.10.11","dns_primary":"10.10.10.12","dns_secondary":null,"from":null,"to":null,"created_at":"2015-12-17T15:59:40Z","updated_at":"2015-12-17T15:59:40Z","ipam":"DHCP","boot_mode":"DHCP","id":187,"name":"gebert.url.de","network_address":"10.10.10.10/24","dhcp":null,"tftp":null,"dns":null,"domains":[],"interfaces":[]}

The domains section will empty until i update it via webinterface.

Regards,
mgebert

Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Description updated (diff)
  • Priority changed from Urgent to Normal
Actions #2

Updated by Shlomi Zadok over 8 years ago

Works for me on 1.11-develop

Actions #3

Updated by Anonymous over 7 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF