From 3664d8e4666bad96a55d1d078d44610ca58dd7df Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Mon, 10 Nov 2014 07:29:03 -0800 Subject: [PATCH] xenapi plugins must target only Python 2.4 features Add a comment documenting the restriction that our xenapi plugins must target Python 2.4 features because of restrictions with the XenServer dom0 userspace. Change-Id: Ide130923b16c0555c3190cbd63ce97e18d18aae0 --- plugins/xenserver/xenapi/etc/xapi.d/plugins/_bittorrent_seeder | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/agent | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/bittorrent | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/console | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/glance | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/ipxe | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/migration | 3 +++ .../xenserver/xenapi/etc/xapi.d/plugins/nova_plugin_version | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/workarounds | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost | 3 +++ plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py | 3 +++ 16 files changed, 48 insertions(+) diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/_bittorrent_seeder b/plugins/xenserver/xenapi/etc/xapi.d/plugins/_bittorrent_seeder index ba7aee485eea..6927b4c57d59 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/_bittorrent_seeder +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/_bittorrent_seeder @@ -14,6 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Seed a bittorent image. This file should not be executed directly, rather it should be kicked off by the `bittorent` dom0 plugin.""" diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent b/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent index 5112cdedafa9..8cae61e2b306 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent @@ -18,6 +18,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + # # XenAPI plugin for reading/writing information to xenstore # diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth b/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth index 9b2b01cf87b0..bd8d3a6965f6 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth @@ -15,6 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Fetch Bandwidth data from VIF network devices.""" import utils diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/bittorrent b/plugins/xenserver/xenapi/etc/xapi.d/plugins/bittorrent index 1fd780191c08..0776c2352b6d 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/bittorrent +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/bittorrent @@ -14,6 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Download images via BitTorrent.""" import errno diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file b/plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file index 417c477b4f3a..9c3a77d1140d 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/config_file @@ -1,5 +1,8 @@ #!/usr/bin/env python +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + import XenAPIPlugin diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/console b/plugins/xenserver/xenapi/etc/xapi.d/plugins/console index 7bbd224090bd..058a0f1d7562 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/console +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/console @@ -11,6 +11,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """ To configure this plugin, you must set the following xenstore key: /local/logconsole/@ = "/var/log/xen/guest/console.%d" diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index 9e21d1c9b403..e05168d2fb52 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -18,6 +18,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Handle the uploading and downloading of images via Glance.""" import httplib diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/ipxe b/plugins/xenserver/xenapi/etc/xapi.d/plugins/ipxe index 6217ef50886b..e0da401fdde0 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/ipxe +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/ipxe @@ -14,6 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Inject network configuration into iPXE ISO for boot.""" import os diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel b/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel index 24cb4025d205..0f3cb7934df5 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/kernel @@ -18,6 +18,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Handle the manipulation of kernel images.""" import errno diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration b/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration index 4ffa9d3a00eb..e9de38c9fe62 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration @@ -15,6 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """ XenAPI Plugin for transferring data between host nodes """ diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/nova_plugin_version b/plugins/xenserver/xenapi/etc/xapi.d/plugins/nova_plugin_version index 12a58bcb23b0..b67c84be524d 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/nova_plugin_version +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/nova_plugin_version @@ -15,6 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Returns the version of the nova plugins""" import utils diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py index 2fbef0e6c96f..d743034dd405 100644 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py @@ -12,6 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + # # Helper functions for the Nova xapi plugins. In time, this will merge # with the pluginlib.py shipped with xapi, but for now, that file is not diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py index 2ee284150115..96002795f0be 100644 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py @@ -12,6 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Various utilities used by XenServer plugins.""" import cPickle as pickle diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/workarounds b/plugins/xenserver/xenapi/etc/xapi.d/plugins/workarounds index de567d99af96..52b9b6208c76 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/workarounds +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/workarounds @@ -15,6 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + """Handle the uploading and downloading of images via Glance.""" import os diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost index b51d6db92831..a13748636c90 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost @@ -17,6 +17,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + # # XenAPI plugin for host operations # diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py index 033ef149f4b0..1e84b6384d8a 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py @@ -18,6 +18,9 @@ # License for the specific language governing permissions and limitations # under the License. +# NOTE: XenServer still only supports Python 2.4 in it's dom0 userspace +# which means the Nova xenapi plugins must use only Python 2.4 features + # # XenAPI plugin for reading/writing information to xenstore #