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

Initial IPAM support #13

Merged
merged 13 commits into from
May 1, 2018
Merged

Initial IPAM support #13

merged 13 commits into from
May 1, 2018

Conversation

asarfaty
Copy link
Contributor

Adding support for ip_pool and ip_block resources

annakhm and others added 4 commits April 17, 2018 22:30
There was a copy/paste bug in some unittests which caused the destruction
tests to be skipped.
Fixing some compilation & fmt error in the terragen code (which
automatically generates the resource code & documentation for new
resources)
Also adding the code for import support to terragen
Adding support for ip_pool and ip_block resources
"net/http"
)

// formatLogicalRouterRollbackError defines the verbose error when
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste error here

old_subnets := old_data.([]interface{})
new_subnets := new_data.([]interface{})
// Go over the new subnets and check which should be created new and which was modified
log.Printf("[DEBUG] DEBUG ADIT subnets changed?\n old %#v\n new %#v", old_subnets, new_subnets)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove this (and below)

Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": &schema.Schema{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to understand where these ids are used.. if other resources could be dependent on these, maybe it would be preferable to expose these as separate objects?

@asarfaty asarfaty mentioned this pull request Apr 29, 2018
return fmt.Errorf("Unexpected status returned during IpBlockSubnet create: %v", resp.StatusCode)
}
d.SetId(ipBlockSubnet.Id)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if d.Set("block_id", blockId) here might work around the nsx bug (won't work for read though, not sure how bad this is)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the read is always called after create/update I don't think it will help. But anyway we will not fully support IPAM in this NSX version, and it will be fixed for the next one.

@asarfaty asarfaty merged commit 5311de2 into master May 1, 2018
@annakhm annakhm deleted the ipam branch May 7, 2019 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants