-
Notifications
You must be signed in to change notification settings - Fork 0
Vast support #21
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
Open
claudia-lola
wants to merge
8
commits into
main
Choose a base branch
from
vast-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+172
−2
Open
Vast support #21
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d63c8fc
add sharetype and sharetype_access resource support
claudia-lola 44b308b
Add vast resource support
claudia-lola b466bea
Fix vippools resource errors
claudia-lola 5cb17c1
fix variable descriptions
claudia-lola 0732c18
Fix variable names, add variable vast_info for provider to be optional
claudia-lola 9fa48bb
add vast_info variable description
claudia-lola ad2182b
Merge branch 'main' into vast-support
sjpb 6b40aa2
Remove vast provider config
claudia-lola File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| resource "openstack_sharedfilesystem_sharetype_v2" "sharetypes" { | ||
| for_each = var.sharetypes | ||
|
|
||
| name = each.key | ||
|
|
||
| description = lookup(each.value, "description", null) | ||
| is_public = lookup(each.value, "is_public", true) | ||
|
|
||
| extra_specs = { | ||
| driver_handles_share_servers = each.value.extra_specs.driver_handles_share_servers | ||
| snapshot_support = lookup(each.value.extra_specs, "snapshot_support", null) | ||
| share_backend_name = each.value.extra_specs.share_backend_name | ||
| "vast:vippoolname" = vastdata_vip_pool.vippools[each.value.extra_specs.vast_vip_pool_name].name | ||
| } | ||
| } | ||
|
|
||
| resource "openstack_sharedfilesystem_sharetype_access_v2" "sharetypes_access" { | ||
| for_each = var.sharetypes_access | ||
|
|
||
| share_type_id = each.value.sharetype_name != null ? openstack_sharedfilesystem_sharetype_v2.sharetypes[each.value.sharetype_name].id : each.value.share_type_id | ||
| project_id = each.value.project != null ? openstack_identity_project_v3.project[each.value.project].id : each.value.project_id | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| resource "vastdata_vip_pool" "vippools" { | ||
| for_each = var.vippools | ||
|
|
||
| name = each.value.name != null ? (each.value.name) : (each.value.network != null ? format("openstack_vlan_%04d", | ||
| one(openstack_networking_network_v2.networks[each.value.network].segments).segmentation_id) | ||
| : each.key) | ||
| vlan = each.value.vlan != null ? (each.value.vlan) : one(openstack_networking_network_v2.networks[each.value.network].segments).segmentation_id | ||
| role = lookup(each.value, "role", null) | ||
| subnet_cidr = lookup(each.value, "subnet_cidr", null) | ||
| tenant_id = (each.value.vast_tenant != null ? vastdata_tenant.vast_tenant[each.value.vast_tenant].id : each.value.tenant_id) | ||
| ip_ranges = each.value.ip_ranges != null ? (each.value.ip_ranges) : [ | ||
| for r in each.value.vip_ranges : [ | ||
| cidrhost(openstack_networking_subnet_v2.subnets[r.subnet].cidr, r.start), | ||
| cidrhost(openstack_networking_subnet_v2.subnets[r.subnet].cidr, r.end) | ||
| ] | ||
| ] | ||
| } | ||
|
|
||
| resource "vastdata_tenant" "vast_tenant" { | ||
| for_each = var.vast_tenants | ||
|
|
||
| name = each.key | ||
| allow_locked_users = lookup(each.value, "allow_locked_users", null) | ||
| allow_disabled_users = lookup(each.value, "allow_disabled_users", null) | ||
| client_ip_ranges = each.value.client_ip_ranges != null ? (each.value.client_ip_ranges) : [ | ||
| for p in each.value.client_ranges : [ | ||
| cidr(openstack_networking_subnet_v2.subnets[p.subnet].cidr, p.start), | ||
| cidr(openstack_networking_subnet_v2.subnets[p.subnet].cidr, p.end) | ||
| ] | ||
| ] | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely we just use the key? This just seems to make it really unclear to me, what am I missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name will be the name in VAST, both Hollie and Stig used the format of
openstack_vlan_<segmentation_id>, because the network is created at the same time thesegmentation_idis not known, so this ensures the vippool from that network is named in that format. But you can override that just by setting thename = "...", I guess it would be best to ask to @oneswig or @holliefae if this is a required/preferred naming for all VAST vippools.