Commit Graph

264 Commits

Author SHA1 Message Date
Cristian Calin 6fe82696d2 provider/openstack: Neutron security group resources
this implements two new resource types:
* openstack_networking_secgroup_v2 - create a neutron security group
* openstack_networking_secgroup_rule_v2 - create a newutron security
  group rule
Unlike their nova counterparts the neutron security groups allow a user
to specify the target tenant_id allowing a cloud admin to create per
tenant resources.
2016-05-03 09:18:48 +00:00
Joe Topjian 62a744a45e provider/openstack: Fix admin_state_up on openstack_lb_member_v1
admin_state_up was never being passed to a load balancing member
during creation.
2016-04-20 19:11:48 +00:00
Joe Topjian 1047df948c Merge pull request #6224 from jtopjian/openstack-mitaka-patches
provider/openstack: OpenStack Mitaka Patches
2016-04-20 08:04:55 -06:00
Roberto Jung Drebes 65987a4b28 static routing entries for routers 2016-04-19 21:26:09 +00:00
Joe Topjian b70b4487bf provider/openstack: OpenStack Mitaka Patches
This commit patches a few acceptance tests in order to get them to
pass under OpenStack Mitaka.

The devstack dev environment script has also been updated to reflect
OpenStack Mitaka as well as the new Terraform dependency vendoring.
2016-04-18 19:32:29 +00:00
Joe Topjian db3e731cf3 Merge pull request #6081 from jtopjian/openstack-token-auth
provider/openstack: Enable Token Authentication
2016-04-16 22:57:01 -06:00
Joe Topjian 9d10028d43 provider/openstack: Fix Access Address Detection
This commit fixes how access ip addresses are detected. The previous
logic used was flawed and would detect the IPs in the wrong order.
2016-04-17 04:38:49 +00:00
Kirill Shirinkin 5824036ca6 provider/openstack: Add value_specs for routers 2016-04-11 10:23:01 +02:00
Joe Topjian a8a3bd71df provider/openstack: Enable Token Authentication
This commit enables the ability to authenticate to OpenStack by way
of a Keystone Token. Tokens can provide a way to use Terraform and
OpenStack with an expiring, temporary credential. The token will need
to be generated out of band from Terraform.
2016-04-10 03:20:49 +00:00
Seth Vargo 68a2a2299e Use schema funcs for reading values from the env 2016-04-08 17:28:54 -04:00
Joe Topjian 28f98c3701 provider/openstack: Allow subnets with no gateway
This commit adds a no_gateway attribute. When set, the subnet will
not have a gateway. This is different than not specifying a
gateway_ip since that will cause a default gateway of .1 to be used.
This behavior mirrors the OpenStack Neutron command-line tool.

Fixes #6031
2016-04-08 03:12:49 +00:00
Joe Topjian 82c6afc5a7 Merge pull request #6052 from jtopjian/openstack-fix-disable-dhcp
provider/openstack: Fix Disabling DHCP on Subnets
2016-04-07 20:41:43 -06:00
Joe Topjian d15a0eb752 provider/openstack: Fix Disabling DHCP on Subnets
This commit fixes a bug where "false" was not correctly being passed to
the subnet creation and therefore enabling DHCP on all subnets.
2016-04-06 21:00:27 +00:00
Joe Topjian 23b953eea3 provider/openstack: Allow resizing when Flavor Name changes
Previously, resizing would only work if the flavor_id changed and
would create an error if the flavor_name changes. This commit fixes
this behavior.

It also quickly refactors the getFlavorID function to use
Gophercloud's IDFromName function. getFlavorID was the basis of
IDFromName so the exact same code is used.

Fixes #5780
2016-04-05 15:31:14 +00:00
Paul Frybarger d8c9e448d4 Fix create/delete statuses in load balancing resources for openstack provider. 2016-03-10 09:35:38 -06:00
Joe Topjian 65d96ef58a provider/openstack: Account for a 403 reply from os-tenant-networks 2016-03-02 21:17:59 +00:00
Joe Topjian 9332a1ddac provider/openstack: Add test for ICMP SecGroup rules with type zero
This is to just catch possible breakage in the future. The actual
support was done in Gophercloud.

Previously, values of 0 were not allowed since there's no such port
as 0. However, there are ICMP codes of 0.
2016-03-01 03:29:14 +00:00
Joe Topjian 7d6116d7c2 provider/openstack: Re-Add server.AccessIPv4 and server.AccessIPv6
GH-4812 removed reading server.AccessIPv4 and server.AccessIPv6
because, AFAICT, they are not set by Nova. After removal, a user
reported that they were no longer able to read IPs from access_ip_v4
and access_ip_v6 on Rackspace. It's possible that Rackspace sets
the AccessIPv* attributes, and if that's true, other cloud providers
might as well through custom extensions.

The priority of how access_ip_v* is set might require some tweaks in
the future.
2016-02-28 21:39:45 +00:00
Joe Topjian d82a4c9259 provider/openstack: Safely typecast network during instance update
This commit protects against unsafe typecasting when an instance is
updating its network configuration.
2016-02-28 19:02:53 +00:00
Joe Topjian 866e49455f provider/openstack: Add detaching as valid pending state
This commit allows "detaching" to be a valid pending state when
detaching a volume. Despite being obvious pending state, it also
helps in race situations when a volume is implicitly being detached
by Nova.
2016-02-27 23:48:52 +00:00
Joe Topjian e872c3d8ba provider/openstack: Instance Block Device cleanup
This commit fixes and cleans up instance block_device configuration.

Reverts #5354 in that `volume_size` is only required in certain
block_device configuration combinations. Therefore, the actual
attribute must be set to Optional and later checks done.

Doc upates, too.
2016-02-27 06:05:01 +00:00
Joe Topjian ed9e7de901 provider/openstack: multi ephemeral support
This commit adds the ability to create instances with multiple
ephemeral disks. The ephemeral disks will appear as local block
devices to the instance.
2016-02-27 04:56:27 +00:00
Joe Topjian cb9099e28a Merge pull request #5355 from jtopjian/openstack-domain-env-vars
provider/openstack: Add Support for Domain environment variables
2016-02-26 21:42:05 -07:00
Joe Topjian 8d00ee3836 provider/openstack: Add Support for Domain environment variables
This commit adds the ability to specify the Domain ID and Domain Name
by OS_DOMAIN_ID and OS_DOMAIN_NAME respectively.
2016-02-27 04:34:17 +00:00
Joe Topjian 41e6851c15 provider/openstack: Making Block Device Size Required
The `volume_size` of a `block_device` was originally set to Optional,
but it's a required parameter in the OpenStack/Nova API. While it's
possible to infer a default size of the block device, making it required
more closely matches the Nova CLI client as well as provides consistent
experience when working with multiple block_devices.
2016-02-27 04:13:26 +00:00
Joe Topjian a230213b33 Merge pull request #5106 from kars7e/master
Add optional cacert_file parameter to openstack provider
2016-02-18 20:26:44 -07:00
Trevor Pounds 79742fc367 Enable `go vet -composites` check and fix warnings. 2016-02-17 11:59:50 -08:00
Kirill Shirinkin 63016155ea Add distributed routers support 2016-02-12 19:55:27 +01:00
Karol Stepniewski 88fb724af8 Add optional cacert_file parameter to openstack provider
Official OpenStack clients support specifing custom CA certificate file
that should be used when communicating with OpenStack server. This patch
adds similar behavior to Terraform OpenStack provider, by:
- Using OS_CACERT environmental variable, if available
- Using cacert_file provider parameter, if configured
2016-02-11 22:56:11 -08:00
Trevor Pounds 0cd0ff0f8e Use built-in schema.HashString. 2016-02-07 16:29:34 -08:00
Joe Topjian 7ccaaa12be provider/openstack: Fix crash when access_network was not defined 2016-02-02 22:59:16 +00:00
Joe Topjian aefd22ed9b provider/openstack Fix LB Member Errors
Fixing Load Balancer Member errors caused by not rebasing with master
before committing.
2016-01-31 22:51:26 +00:00
Joe Topjian baeaee0103 Merge pull request #4359 from jtopjian/jtopjian-openstack-lb-member
provider/openstack: Load Balancing Member Resource
2016-01-31 15:40:15 -07:00
Joe Topjian 1ccd0491ff Merge pull request #4812 from jtopjian/openstack-per-network-floating-ip
provider/openstack: Per-network Floating IPs
2016-01-31 15:24:59 -07:00
Joe Topjian df660a26a1 provider/openstack: Per-network Floating IPs
This commit adds the ability to associate a Floating IP to a specific
network. Previously, there only existed a top-level floating IP
attribute which was automatically associated with either the first
defined network or the default network (when no network block was
used).

Now floating IPs can be associated with networks beyond the first
defined network as well as each network being able to have their own
floating IP.

Specifying the floating IP by using the top-level floating_ip
attribute and the per-network floating IP attribute is not possible.

Additionally, an `access_network` attribute has been added in order
to easily specify which network should be used for provisioning.
2016-01-31 22:17:51 +00:00
Joe Topjian b488541ee9 provider/openstack Add Acceptance Test for No Port IP 2016-01-31 22:04:06 +00:00
Yo Takezawa 17e6e5d118 provider/openstack Convert FixedIPS from struct to map for ResourceData 2016-01-29 14:23:03 +09:00
Yo Takezawa 0aff8e28a5 provider/openstack Changing the port resource to mark the ip_address as Optional 2016-01-27 17:36:29 +09:00
Ian Duffy 47ac10d66b Change resource.StateChangeConf to use an array for target states
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-01-21 01:20:41 +00:00
Joe Topjian 7b4e17708a Merge pull request #4623 from jtopjian/openstack-instance-personality
provider/openstack: Add Instance Personality
2016-01-12 22:04:14 -07:00
Joe Topjian 4a4f2ad9e5 provider/openstack: Add Instance Personality
This commit adds the "personality" attribute which is used to provision
destination files on the instance.
2016-01-11 03:53:30 +00:00
Joe Topjian f1b55de7c8 Merge pull request #4617 from ebsco/master
Fix to not put fixed_ip in request if not defined
2016-01-10 19:39:21 -07:00
Cliff Pracht 1de2fde147 Fix to not put fixed_ip in request if not defined 2016-01-07 09:55:43 -05:00
Joe Topjian 2503f0b01d provider/openstack: Ensure valid Security Group Rule attribute combination
This commit ensures that a valid combination of security group rule attributes
is set before creating the security group.
2015-12-30 18:44:56 +00:00
Joe Topjian 8d5a2d05a4 provider/openstack: Load Balancing Member Resource
This commit adds the openstack_lb_member_v1 resource. This resource models a
load balancing member which was previously coupled to the openstack_lb_pool_v1
resource.

By creating an actual member resource, load balancing members can now be
dynamically managed through terraform.
2015-12-17 07:29:58 +00:00
Joe Topjian 669ddbfc5c Merge pull request #4288 from jtopjian/jtopjian-openstack-bfv-set2list
provider/openstack: Convert block_device from TypeSet to TypeList
2015-12-16 23:05:00 -07:00
Joe Topjian 03a7926198 Merge pull request #4298 from jtopjian/jtopjian-openstack-devstack
provider/openstack: DevStack Deploy Script
2015-12-16 11:44:12 -07:00
Joe Topjian 1ff403347b provider/openstack: Fix set hash for security group test 2015-12-13 03:15:52 +00:00
Joe Topjian 7cbd18a88d provider/openstack: DevStack Deploy Script
This commit includes a script to deploy a standardized devstack environment
for use with development and testing.
2015-12-13 02:58:29 +00:00
Joe Topjian 4716451617 provider/openstack: Convert block_device from TypeSet to TypeList
This change better reflects how block devices are passed to the Nova API
and allows for future enablement of block_device features. It also resolves
an interpolation bug.
2015-12-12 22:18:23 +00:00