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

Expose CloudSubnet creation #440

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

miha-plesko
Copy link
Contributor

With this commit we allow user to create CloudSubnet via API. Example request:

POST /api/providers/4/cloud_subnets HTTP/1.1
{
	"action": "create",
	"resource": {
		"router_ref": "aae5c1ff-9860-4a56-bb01-e936a7086f5a",
		"name": "My New Cloud Subnet",
		"address": "130.130.130.0",
		"netmask": "255.255.255.0",
		"gateway": "130.130.130.1"
	}
}

(it's up to raw_create_cloud_subnet on each provider to decide what arguments are consumed, example above is for Nuage provider, see here https://github.com/ManageIQ/manageiq-providers-nuage/blob/master/app/models/manageiq/providers/nuage/network_manager/cloud_subnet.rb#L54-L61)

Needed for: ManageIQ/manageiq-providers-nuage#118
RFE BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1574972

@miq-bot add_label enhancement
@miq-bot assign @abellotti

/cc @Ladas @agrare

Assigning @abellotti since you merged last few PRs so I assume you're the guy - are you? 😃

@abellotti
Copy link
Member

Thanks @miha-plesko for the enhancement, this looks good. Maybe add a spec test when you get a chance. Thank you.

@miha-plesko miha-plesko force-pushed the expose-create-subnet branch from 2efe8b2 to d2965ee Compare August 6, 2018 08:54
@miha-plesko
Copy link
Contributor Author

Apologies for delay @abellotti , added the tests just now.

@abellotti abellotti added this to the Sprint 92 Ending Aug 13, 2018 milestone Aug 6, 2018
@abellotti
Copy link
Member

Thanks @miha-plesko for the API Enhancement. LGTM!! 👍

@abellotti
Copy link
Member

Can you take care of the travis errors before I merge. Thanks.

@miha-plesko miha-plesko closed this Aug 6, 2018
@miha-plesko miha-plesko reopened this Aug 6, 2018
@miha-plesko
Copy link
Contributor Author

Kicking Travis because I think red Travis isn't caused by this PR.

With this commit we allow user to create CloudSubnet via API.
Example request:

```
POST /api/providers/4/cloud_subnets HTTP/1.1
{
	"action": "create",
	"resource": {
		"router_ref": "aae5c1ff-9860-4a56-bb01-e936a7086f5a",

		"name": "My New Cloud Subnet",
		"address": "130.130.130.0",
		"netmask": "255.255.255.0",
		"gateway": "130.130.130.1"
	}
}
```

Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
@miha-plesko miha-plesko force-pushed the expose-create-subnet branch from d2965ee to b0a5110 Compare August 6, 2018 12:58
@miq-bot
Copy link
Member

miq-bot commented Aug 6, 2018

Checked commit miha-plesko@b0a5110 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

@agrare
Copy link
Member

agrare commented Aug 6, 2018

@abellotti #446 should take care of the failing specs

@abellotti abellotti closed this Aug 6, 2018
@abellotti abellotti reopened this Aug 6, 2018
@abellotti abellotti merged commit 1d56cf5 into ManageIQ:master Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants