Python 3 is used in executing 'tox -e docs' by default currently.
When Python 3 is used, there are some missing notification examples.
In python 3, map function returns an iterator instead of a list,
and importlib.import_module is not executed in the document generation.
So it causes missing versioned notification examples in the nova docs.
This patch fixes it.
Change-Id: Ie4f3f9be0ca7f94ce00a14f3d825a067a807eb12
Closes-Bug: #1779606
The instance.snapshot.start and .end notification sample file was
attached to two different Notification ovo by mistake. This caused that
the samples are appeared in the notification dev-ref twice.
This patch removes the duplication and adds a simple check to the doc
generation code to detech such problems in the future.
Change-Id: I8478c134f9cdb08c02a44e1838dbacede5523914
Closes-Bug: #1732685
Versioned notifications are functionally tested against stored sample
data. Also most of the instance notitication shares payload structure.
Today we store a separate sample for every instance notification.
These samples store similar, mostly redundant data. When a new field
is added to the InstancePayload then every instance notification
related sample file needs to be modified. This leads to big and
redundant changes like I18af99479562e2fe5e74e6e1252b804b074fee58.
To remove the redundancy this patch proposes to use json references
in the sample files instead of copy pasting the same notification
sample fragment to every sample.
As a first step this patch introduces a small json ref resolver.
Then subsequent patches will replace the duplicated sample data
with references to common sample fragments.
This proposed resolver supports resolving the refs recursively so
a referenced json fragment can reference further fragments. However
the current implementation does not handle reference loops.
The resolver also supports overriding parts of the referenced
json fragment to support content customization needed in the next
patch.
Change-Id: Ic3ab7d60e4ac12b767fe70bef97b327545a86e74
The new doc template includes jquery too late and therefore showing
and hindig notification samples and auto hiding them by default doesn't
work.
This patch loads the jquery lib earlier for the notification devref.
Closes-Bug: #1713974
Closes-Bug: #1714363
Change-Id: I07db4755c69d493e591761578d1077bb44acda41
This call generates the following deprecation warning:
RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated
and will be removed in Sphinx 1.7, please use docutils' instead.
Resolve this.
Change-Id: I73a182248a64d1e931a1bcb3989aa96f0aec71ed
As pep8 does not run on doc generation python code so we have some
style violations there. As it not too hard to fix the problems and
therefore enable pep8 on these files this patch proposes such a
change.
Change-Id: I26104ea66fc4f3e67f8227025f43202e483beb25
The already transformed aggregate notifications were missing from the
notification dev-ref due to a missing import in the doc generation code.
This patch improves the doc generation to automatically pick up new modules
added under nova.notitications.objects.
Change-Id: I688bc59f19814956d73e04b4970add21ce64ba90
Closes-Bug: #1698779
The keypair.create.start and keypair.create.end notifications
has been transformed to the versioned notification framework.
Change-Id: I71e9d8dae55653ad3ee70f708a6d92c98ed20c1c
Implements: bp versioned-notification-transformation-pike
This patch implements the versioned notifications for flavor
create and destroy.
Implement blueprint: flavor-notifications
Change-Id: Icc2169b87ffba4e7e2079076a82029156c584c6a
The doc generator only picked up the event types related to instance
actions because the doc generator looked up the registered notification
classes only. Until now, only the instance related notifications were
imported in the doc generation environment so the other notification
classes were not registered.
This commit explicitly imports the modules that defines the notification
classes to make the doc complete.
Change-Id: I269e05ddb62ec6c6cc7f7922c1344186ccf850d1
Closes-bug: #1640818
Until now the notification devref only contained a link to the sample file
and that link did only exist after the sample file was merged.
This is suboptimal as the locally generated doc might be incomplete.
This patch changes the doc to contain the content of the sample file.
Change-Id: I4343a2feb13de8b614e8d42d5f1db14102ab492e
The notification_sample decorator is changed to handle
attaching multiple sample files to a notification object.
Change-Id: I4c3df17d93282f6946221da65d26d0ca3194d3df
Only registering the notification objects during unit test.
Notification objects are never used in the Nova RPC interface
and shall not be mixed with such objects.
Change-Id: Iba9079bb204e6ef1302529ac159199ab9fa6272b
To be able to separate the versioned notification related
object model from the nova internal object model a new
nova.notification.object package is introduced.
As nova had nova/notifications.py already in the tree
the code from that file is moved into the new nova.notification
package as a first step.
Implements: bp versioned-notification-transformation-newton
Change-Id: I315f548180c260c22a2ebcf7b7cb56d284b6e580
This commit adds a new sphinx extension that inspects the nova code
and adds information about the existing versioned notifications to
the nofitications devref. This way the devref is automatically kept
up to date with relevant information.
Partially-Implements: bp versioned-notification-api
Change-Id: If65d5d81e26cb2b4a9f57a8c7d37d3de310ebe00