Commit Graph

160 Commits

Author SHA1 Message Date
Andreas Jaeger 56023326cb Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I4ace84f37b5814a54c130f6601baa2275a10d906
2020-06-01 18:49:52 +00:00
OpenStack Release Bot ccb2031788 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Ifa951b54daf715684a25ba5e1d6dedb230492236
Sem-Ver: feature
2020-04-17 14:54:59 +00:00
OpenStack Release Bot 1346504e3f Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I9fb25e3f4aa97eb838c680b983160581080ae43d
Sem-Ver: feature
2019-09-20 17:44:34 +00:00
Monty Taylor b47fb2af55 Update for opendev
Change-Id: I2cf0463108cf0bea37a221ee1dd74252d13f41c4
2019-04-21 13:00:42 +00:00
OpenStack Release Bot 50db7a41a6 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: I8d88d2086b05b39ff71169737afb3cfd418bc024
Sem-Ver: feature
2019-03-18 14:57:13 +00:00
Monty Taylor 6f40858c05
Support v4-fixed-ip and v6-fixed-ip in create_server
novaclient supports v4-fixed-ip and v6-fixed-ip as aliases for fixed_ip.
As shade used to use novaclient and passed this content through the
switch to REST resulted in a behavior regression for shade users. That's
bad, mmkay?

Add in support for the same aliases to create_server, so that users
upgrading to newer shade are hosed.

Closes-Bug: #1798489
Change-Id: I55bc88e9b2cfa5ad1b6a27640db11bc848584c21
2018-10-18 10:42:24 -05:00
Monty Taylor 4ff38e65a4
Add release note about decoupling
Change-Id: I87bd8c9c1519f9500097c8d3ebc9626cb3f08467
2018-10-17 08:59:50 -05:00
Monty Taylor 3b2cad5d31
Decouple OpenStackCloud from Connection
Revert the openstacksdk subclassing from shade. The idea was to
reduce the workload, but trying to make sure that the Cloud abstraction
in openstacksdk doesn't break shade's contract while we update things is
a ton of work to meet the contract that's not really valuable to people.

Instead, we'll put shade on lifesupport and only accept bugfix patches.

Revert "Make OpenStackCloud a subclass of Connection"

This reverts commit ab3f400064.

Revert "Use openstack.config directly for config"

This reverts commit 2b48637b67.

Revert "Remove the task manager"

This reverts commit 28e95889a0.

Change-Id: I3f5b5fb26af2f6c0bbaade24a04c3d1f274c8cce
2018-10-16 08:58:01 -05:00
Monty Taylor 28e95889a0
Remove the task manager
The underlying openstacksdk library is shifting how task manager works,
so stop trying to send it a task manager. This is a feature basically in
place just for nodepool which is being expanded to be more usable by
everyone. The likelihood that anyone other than nodepool is using it is
... very low.

Change-Id: I04be3937589a805a5f9686c91a78933eebcfa022
2018-09-25 07:17:39 -05:00
David Rabel bf9ca17901 Fix format in release notes
Indentation was wrongly interpreted as quotation.

Change-Id: I6ab20cbaa72254779acb8710275b2638d3ba6b30
2018-08-16 16:37:35 +02:00
Zuul b274873695 Merge "python-shade expose MTU setting." 2018-07-30 18:17:45 +00:00
Zuul dc434983b6 Merge "Add support for static routes" 2018-07-30 18:06:35 +00:00
OpenStack Release Bot 9bf38c8533 Update reno for stable/rocky
Change-Id: I8e3c448f8daddc30130a1813275e3d363ddc1eb9
2018-07-26 12:42:25 +00:00
Ryan Brady 1ddc618d2d Add support for static routes
The networking API v2 specification, which is implemented by OpenStack
Neutron, features an optional routes parameter - when updating a router
PUT requests). Static routes are crucial for routers to handle traffic
from subnets not directly connected to a router.  This patch adds the
routes parameter to the OpenStackCloud.update_router method as a list of
dictionaries with destination and nexthop parameters.

Example:
[
   {
      "destination": "179.24.1.0/24",
      "nexthop": "172.24.3.99"
    }
]

Change-Id: I14205b6bb071d0b46967f29b6287f74d8796add8
2018-07-26 07:54:15 -04:00
Toure Dunnon 545b5aae28 python-shade expose MTU setting.
The networking API v2 specification, which is implemented by
openstack neutron, features an optional MTU parameter - when
creating a network, this allows operators to specify the value
for the maximum transmission unit value.

Change-Id: I288f02551555fff3e8b350fc6d7c6ae8f60c405c
2018-07-23 13:06:24 -04:00
Doug Hellmann f29630d053 remove redundant information from release notes build
The release notes build was configured with two pages that scan the
master branch. Now that reno adds consistent anchors to sections, that
means we have two pages with the same anchors and sphinx will complain.
This patch removes the "mainline" page and changes the title of the
"unreleased" page to show the mainline title. We need to keep the page
called "unreleased" so that the release automation that creates the
stable branches can figure out where to insert the next series-specific
page in the sequence in index.rst.

Change-Id: Ie6ed41a8fadb73a2b9b78426499a41ed30bfcd4d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-30 08:57:47 -04:00
Rarm Nagalingam 5b81959b32 Adds toggle port security on network create
Added a new property, 'port_security_enabled' which is a boolean to
enable or disable port_secuirty during network creation. The default
behavior will enable port security, security group and anti spoofing
will act as before. When the attribute is set to False, security
group and anti spoofing are disabled on the ports created on this
network.

Change-Id: If984a82ca5f6fb69ee644f4fa84333df09d7f8bc
2018-03-09 21:05:05 +11:00
David Shrewsbury 9be6d3ac16 Fix for timeout=None in orchestration API calls
Our other API calls allow timeout=None to mean "no timeout". Heat does
not have an equivalent for "no timeout", but None will mean to use the
heat server default. Allow for this value in the orchestration calls.

Change-Id: Iae775676e9bb7d3f58d7041537f3a3b15ba52593
2018-02-23 09:36:03 -05:00
Zuul 2b63418e84 Merge "Switch to providing created_at field for servers" 2018-01-31 20:59:31 +00:00
Mohammed Naser 5c7800d2d5
Switch to providing created_at field for servers
All of the current models return the creation date in created_at
with the exception of servers which are currently returned with
a created field instead.

This patch addresses this and gives the ability to get access to
both.

Change-Id: Ifbd59834080eea62dead19d18a9a11a851a4ce2e
2018-01-31 10:17:43 -06:00
OpenStack Release Bot 950b6c736d Update reno for stable/queens
Change-Id: Ib567dcc62c9ca1aa76b89bac259d1bf6a51422ae
2018-01-24 18:10:42 +00:00
Daniel Mellado e3b301de27 Add tag support to create_stack
Ported from python-openstacksdk [1]. When creating a heat stack, this
commit adds tag support, as specified by [2]

[1] https://review.openstack.org/#/c/525174/
[2] https://developer.openstack.org/api-ref/orchestration/v1/#create-stack

Change-Id: Id8495e9ca09f592aad83338b72878a3c40f8e27f
2017-12-12 15:12:56 +00:00
Trygve Vea c9bfc45844 Implement availability_zone_hints for networks and routers.
Adds an optional parameter to the create_network and
create_router-methods, for use with availability zone-scheduling of
network agents.

Change-Id: Ifb93a10415dc676f5cc56b5315f2dff24fc395b8
2017-11-27 16:09:41 +01:00
Zuul b5e905f9b8 Merge "Add method to cleanup autocreated image objects" 2017-11-17 15:26:14 +00:00
Zuul b5fd8c4964 Merge "Cleanup objects that we create on behalf of images" 2017-11-17 15:17:37 +00:00
Monty Taylor 5996a0313b
Add method to cleanup autocreated image objects
This shouldn't really be needed, as the objects should get cleaned up
automatically. BUT - if things leak, this method can be used to delete
any objects shade has uploaded on behalf of the user for deleting
images.

While in there, clean up test_image to use a few more good practices.

Change-Id: Ifb697944856e1922517074d84a7c00a4af75b1e6
2017-11-16 15:45:51 -06:00
Andreas Jaeger 6062a1b193 Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.

Change-Id: I8160e7ab5358868e039b22d65daf19b780fb991a
2017-11-16 18:48:29 +01:00
Monty Taylor 371e0b667e
Cleanup objects that we create on behalf of images
When the use performs create_image on a cloud that requires the image be
uploaded to swift, we upload the image content to swift for them. Once
the image is imported, the content in swift is no longer needed as
glance copies the data into its own area. Clean the images up so that
we're not just accumulating tons of content in swift.

Change-Id: Iede6441c0cad1d99e92fdfacf96d81aad479a93e
2017-11-16 10:37:43 -06:00
Monty Taylor eeea77d797
Document current_user_id in a release note
Also fix the connect_as docstring.

Change-Id: I53203b892bcf03d540d6e551ec9615439ad5c4c9
2017-11-15 08:44:57 -06:00
Monty Taylor 1e0d1b370f
Remove reference to context-managers from release note
We didn't wind up keeping these.

Change-Id: Id111436ca9d0637a8d71250decede12f23122f0a
2017-11-14 16:22:51 -06:00
Monty Taylor c612a6407a
Add ability to work in other auth contexts
Add methods and context managers to facilitate working in different
projects or different auth contexts, but sharing the Session and other
config information from the existing cloud. Sharing the Session allows
for version discovery cache to be shared, and keeps the user from
needing to do a bunch of work to get a cloud that's like the current one
but slightly different.

Change-Id: I9190ee725cad00db4e0b6ed8321e3021a703a2e4
2017-11-14 06:31:37 -06:00
Monty Taylor 8cda430e8b Add method to set bootable flag on volumes
If a person wants to create a bootable volume not from an image, they
need to set a flag, which is done with this action call.

Change-Id: I765eb97501a5ba9e54325c8c56573bb7311deb72
2017-10-12 21:40:53 +00:00
Monty Taylor fd9c2b5729 Add group parameter to create_server
Server groups are a user-facing feature and can be requested via
scheduler hints. While that already exists it's not the world's cleanest
user interface, so add a specific parameter which will set the right
thing into the scheduler hints dict.

Change-Id: Idb28779ed1fde341acab2116b510fce349f74b50
2017-10-12 16:46:59 -04:00
Monty Taylor 2c24e204a6
Record server.id in server creation exception
If an error happens in the initial creation, no id is returned
to the server can't be cleaned up.

Change-Id: Ieb818dcf9ded062f016a3f96342f320dc203edd0
2017-09-15 10:59:04 -06:00
Monty Taylor 8b47d15fd5
Use new keystoneauth version discovery
We can remove a ton of our logic. We still need SOME because we have a
different fallback strategy that isn't appropriate for keystoneauth
generally.

There are a couple of tests removed, since they were testing shade code
that was removed. Also it's worth noting that there are tests in
test_domain_params and test_image that are mocking the client rather
than mocking the requests and we should fix those.

Co-authored-by: Samuel de Medeiros Queiroz <samueldmq@gmail.com>
Change-Id: I78019717cdee79cab43b0d11e737327aa281fd03
2017-09-01 10:10:29 -05:00
OpenStack Release Bot 420e7454de Update reno for stable/pike
Change-Id: I03e74702143f0d8ba248c12aba2c179d6cbaafdd
2017-07-28 21:08:43 +00:00
Monty Taylor 54d6e1d184
Add flag to include all images in image list
Recent Glance v2 hides images that are shared but not accepted. The
way to see them is to send member_status=all, which is a bit low-level
for a shade user to need to know.

Add a show_all to list_images that defaults to False so that behavior
doesn't change. Don't add it to search_images, because at the
search_images level the user has the ability to pass in whatever filters
they want.

Change-Id: Ida2ea943168f5be56a60a94576bdcc6c8e1a9d24
2017-07-07 12:10:06 -05:00
Doug Hellmann 65ce1a2289 switch from oslosphinx to openstackdocstheme
Change-Id: I83c5856a49cdfd912eb2d62314848a4cc4905fe1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-30 10:14:38 -04:00
Samuel de Medeiros Queiroz f4668b7c6f Project update to change enabled only when provided
The project update call considers enabled=True as the default, causing
the project to always become enabled unless enabled=False is passed
explicitly.

This patch removes that default and only touches the enable field when
it is explicitly provided as enabled=False or enabled=True.

Closes-Bug: #2001080

Change-Id: I0a3b926b42be0321d06ebc370e4f51eba4150a50
2017-06-26 17:48:52 -04:00
Monty Taylor bc942953bc
Fix image normalization when image has properties property
In the somewhat pathological case of an image having a property named
properties already that contains a non-dict value, image normalizaiton
becomes quite unhappy. Fix it.

Change-Id: I2ce4dd4e3b7a4a9b46ff2bf699d2c8517e1ce7ce
Story: 2001073
Task: 4697
2017-06-21 04:22:59 +01:00
Monty Taylor 74522a1a22
Fix delete_ips on delete_server and add tests
This codepath was basically completely untested and essentially
completely broken. Fix the break, but also add tests for it.

Also add tests for config_drive while we're in there.

Change-Id: I9f44474000213bab9e08266a376e41fecc4fbc1f
2017-06-21 04:22:59 +01:00
Monty Taylor 16cd2cc88b
Fix config_drive, scheduler_hints and key_name in create_server
We don't want to pass these if they're None. Turns out - we don't want
to pass them if they're False either.

Change-Id: I421b4e537892deead1866ddc979565e86fbcb211
2017-06-21 04:22:54 +01:00
Monty Taylor 3aee4f5e6e
Remove novaclient from shade's dependencies
All calls to nova are now done via REST. This means we can remove the
dependency.

Only two more to go ...

Change-Id: I01a0afef5986b7452fd73e04c48568ebb9817681
2017-06-18 12:57:21 -05:00
Monty Taylor c431cc2c4b
Add some release notes we forgot to add
Change-Id: I05c31400e6f2e584a656c8ab422875be2d6f6bfe
2017-06-16 17:31:49 -05:00
Monty Taylor 072001a628
Allow a user to submit start and end time as strings
get_compute_usage currently requires a user to provide a datetime
object. That's actually fairly unfriendly. Also, it turns out if you
happen to produce one of those with timezone offset information, Nova
will return a 400 error. It's pretty easy to convert a datetime with
timezone info to a datetime in UTC without it - so do that first.

Now a user can submit a fully compliant ISO 8601 datetime with whatever
info they want and we'll make it meet nova's standards. They can also
supply a datetime if they prefer.

Also - do date parsing before project get - to avoid an API call if the
validation that doesn't need an API call fails.

Finally, supply a default for 'start' of the first day OpenStack
existed.

Change-Id: I53989d47f0d24695c19c1023e35acb315bec9eea
2017-05-23 14:05:59 -05:00
Monty Taylor 4f807b8c60
Include two transitive dependencies to work around conflicts
For people installing released shade from pip and then trying to use it
somehow through entrypoints, 1.20.0 is currently broken because of some
transitive dependencies, ordering issues and conflicting exclusion
ranges.

While this is by no means a comprehensive or sustainable solution to the
problem, it does unbreak the end users currently broken and is not
terribly onerous. Both of these additions are tracked in g-r and both
can be removed when the dependencies that pull in conflicting ranges of
things are removed.

Change-Id: I6a4a1ab5ab109f0650873201868e0f1c4d09c564
2017-04-21 13:30:31 -05:00
Monty Taylor aa58173f0d
Add ability to configure extra_specs to be off
We fetch flavor extra_specs for each flavor for consistency with old
behavior. However, it's costly and often just simply not needed.

Query clouds.yaml for extra client settings and if "get_flavor_extra_specs" is
set to false, set the default for list_flavors to false.

Change-Id: Iaea1c41e8e0ae504cb080d7d37407de12be96fd1
2017-04-02 17:06:51 -05:00
Jamie Lennox 88d8a37cfa Add server security groups to shade
We need a way to add and remove security groups to a server in shade.
This will let us modify them from ansible.

Change-Id: I5602e44720485e20491cf4930605362312274b20
2017-03-31 09:23:59 +11:00
Monty Taylor 8aa8688ba8
Move futures to requirements
Wow. We had futures in our test-requirements so we never noticed it
wasn't in our regular requirements.

Change-Id: I6ae3434effc778524908d009627e9c0da6258f7c
2017-03-28 07:52:38 -05:00
Monty Taylor 8059b3c804
Add list_availability_zone_names method
Nodepool would like to do smart things with scheduling across AZs. In
order for it to that, it needs a list of them, which we can provide.

Change-Id: I9a3b97ccb797ea7a66a832b03da2bd4afd659097
2017-03-27 11:37:34 -05:00