Commit Graph

46 Commits

Author SHA1 Message Date
yuyafei c97f3eec01 Remove white space between print and ()
TrivialFix

Change-Id: Ice05cc9848bc0b647ee20cfad20c23b47f8fedbd
2016-08-02 07:31:35 +00:00
Alex Gaynor b055e16846 Fixed many typos.
These were found using: https://github.com/intgr/topy

Change-Id: Ia4e14508c285d95ab4eaeabbde032ecc5e7c9e4b
2014-04-25 21:47:41 -07:00
Johannes Erdfelt 27c8086028 xenapi plugins: Make sure subprocesses finish executing
Fixes bug 1286187

Neither execute_get_output() nor execute() would wait for the process to
fully finish executing. This could potentially create a race condition
where commands execute in a different order than intended.

Also, for execute() it could cause a process to never finish executing if
it generates enough output to block writing to the pipe.

Change-Id: I3404f4b3ca1cddeec2f3e7b393817a6ccc42bec7
2014-02-28 16:25:21 +00:00
liu-sheng 74f953a1d7 Remove vi modelines
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.

Also a check is added to hacking to detect if they are re-added.

Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
2014-02-03 14:19:44 +00:00
Matt Riedemann 016e39734e Fix several flake8 issues in the plugins/xenserver code
Due to some issues in the gate, several flake8 errors got merged
recently. This patch fixes the most recent issues found.

For the H304 relative import errors, we have to skip those because they
are put into /etc/xensource/scripts which is the current working
directory when running the plugin.

For the H231 incompatible python 3 'except x,y' construct, we have to
skip those because this code is written to run on python 2.4 and 'except
x as y' does not work with python 2.4.

Note that in cleaning up some of the H304 failures for relative imports,
I also re-arranged the imports to follow the hacking guide of doing
standard library packages first, then third party packages, and finally
nova-specific packages.

Closes-Bug: #1229753

Change-Id: I1c2211fd6a10d43d7e65cdb4e18530397788cf2c
2013-09-24 09:04:21 -07:00
Kurt Taylor d17f9ab13d Update OpenStack LLC to Foundation
Update all references of "LLC" to "Foundation".

Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
2013-02-26 19:15:29 -05:00
Sean Dague 5fca1d9e97 fix new N402 errors
fix the N402 errors that have slipped in in the last 48 hrs since
starting this patch series.

fix an N401 error that our scanner current can't find because it
only looks for doc strings on classes and defs.

this is the xeno's paradox of patch series, but we're getting close.

Change-Id: I4a763bb4c812335d853eae05c72464f18ab93297
2013-01-10 08:57:09 -05:00
Zhongyue Luo 61c5597a09 Backslash continuation removal (Nova folsom-2)
Fixes bug #938588

Backslash continuations removal for scripts in bin/, plugin/, and etc.

Change-Id: Idd17048b6e8db6e939946968e011e68da8585b8d
2012-05-31 11:26:37 +08:00
Yuriy Taraday 01a938f7fe HACKING fixes, all but sqlalchemy.
Looks like this fixes all HACKING problems that were around.
Thanks to Dina Belova and Alexander Kovalev for this work.

Change-Id: I8157f0d4890184c1216aab63ef7180ee8b7a184d
2012-03-07 12:51:39 +04:00
Vishvananda Ishaya 20b4d89512 Remove a whole bunch of unused imports
Change-Id: I6759e5b6250c48cc0deb4b198b44c948c64c47d1
2012-01-13 13:55:38 -08:00
Kevin L. Mitchell 6090313757 Updates OVS rules applied to IPv4 VIFs
Change-Id: I90cf18a6f60a792c184097f5eeea4282b58f85c5
2011-12-13 22:42:05 +00:00
Ewan Mellor f11f6f789e Bug #888719: openvswitch-nova runs after firstboot scripts
Move openvswitch-nova to 23 in the boot order.

The openvswitch-nova init.d script used on XenServer has been set to run
at 96 in the boot order (i.e. very late).  This is inconvenient, because it
means that it runs after the firstboot scripts, so if you want to do an
automated install of a compute VM, say, you can't rely on the Open vSwitch
rules being ready.

23 places it after the networking start up (9 through 14) and before the
firstboot scripts (24).

Change-Id: I5c4f2f02c78bd7b8ccc6cac4d6549209a6dcbdb0
2011-11-11 11:53:05 -08:00
Ewan Mellor 0a56ae6fa2 Allow tenant networks to be shared with domain 0.
If domain 0 has an IP address on a given bridge, then add a flow rule to
allow traffic to leave that port.  This allows for the case where domain 0
and the tenant network are sharing a bridge, which is useful in non-production
environments.

At the same time, simplify the interface to ovs_configure_base_rules.py.
There is no need to pass the bridge in, because it's implicit in the selection
of the physical interface, and can be obtained using ovs-vsctl iface-to-br.

Having made these two changes, it's now reasonable to apply flow rules to all
interfaces as a default (if not overridden in the sysconfig file).

Change-Id: I2a33ed55246d49b0e4f57db909e1b40351d27602
2011-09-24 23:46:23 -07:00
Ewan Mellor 16e3f2effc Use ovs-vsctl iface-to-br to look up the bridge associated with the given VIF.
This avoids assuming that vifX.Y is attached to xenbrY, which is untrue in
the general case.

Change-Id: Ie3398b4a2231e0483acae272be71cb09a1744872
2011-09-24 23:40:26 -07:00
Ewan Mellor 31e3aed4a2 Remove the unnecessary insertion of whitespace. This happens to be enough
to match this patch apply on recent versions of XenServer / Xen Cloud Platform.
2011-06-20 20:33:15 -07:00
Cory Wright 2bd6e55613 pep8 fixes 2011-05-31 09:51:20 -04:00
Cory Wright 613aee2dd1 move udev file so it follows the xen-backend.rules 2011-05-26 16:58:06 -04:00
Cory Wright 0850945efd move init start position to 96 to allow openvswitch time to fully start 2011-05-20 21:30:04 +00:00
Cory Wright 2c6c184138 fix typo in udev rule 2011-05-18 20:46:21 +00:00
Cory Wright fd2861fdcd fix sys.argv requirement 2011-05-13 21:05:12 +00:00
Cory Wright bccbe3f845 add udev rules and modified ovs_configure_vif_flows.py to work with udev rules 2011-05-13 19:29:10 +00:00
Cory Wright a7c25a19a9 Add init script and sysconfig file for openvswitch-nova 2011-05-13 14:21:55 +00:00
Cory Wright a13616c2de removed unused imports and renamed template variables 2011-04-22 16:35:26 -04:00
Cory Wright bbcc230416 change action= to actions= 2011-04-21 14:53:03 -04:00
Cory Wright 7c53dc7a79 bugfix signature 2011-04-20 14:24:29 -04:00
Cory Wright 169496af39 refactor the way flows are deleted/reset 2011-04-20 14:11:25 -04:00
Cory Wright a46bd9fb64 only apply ipv6 if the data exists in xenstore 2011-04-19 22:13:40 +00:00
Cory Wright 4e11c04a34 strip output, str() link local 2011-04-19 20:10:57 +00:00
Cory Wright c134d3c9bf calc link local 2011-04-18 13:30:54 -04:00
Cory Wright f2e9d4120e set the bridge on each OvsFlow 2011-04-14 14:35:42 -04:00
Cory Wright a4e1db03a2 use novalib for vif_rules.py, fix OvsFlow class 2011-04-01 20:26:59 +00:00
Cory Wright 74b9f240c7 extract execute methods to a library for reuse 2011-04-01 19:54:55 +00:00
Cory Wright 367581e63d change bridge 2011-04-01 15:28:21 +00:00
Cory Wright d7c51db418 lots of updates to ovs scripts 2011-04-01 14:43:04 +00:00
Cory Wright ab1bf7c0c1 minor fix and comment 2011-03-28 21:00:44 +00:00
Cory Wright f835c01f41 * committing ovs scripts 2011-03-18 20:35:44 -04:00
Eric Windisch 65f6648f61 cast execute commands to str 2011-03-11 12:09:20 -05:00
Eric Windisch 2379fc056d execvp: fix params 2011-03-10 19:26:20 -05:00
Eric Windisch e8554da80a execvp: cleanup. 2011-03-09 16:44:48 -05:00
Eric Windisch cac5881eaa execvp 2011-03-08 01:01:41 -05:00
Cory Wright 002bbfa7a6 Moving README to doc/networking.rst per recommendation from Jay Pipes 2010-12-27 12:06:36 -05:00
Cory Wright 3d810cf7c6 merge antonymesserli's changes, fixed some formatting, and added copyright notice 2010-12-22 13:18:03 -05:00
Antony Messerli a653173c75 Added networking protections readme 2010-12-22 11:28:08 -06:00
Cory Wright 1b47ef95ff Close devnull filehandle 2010-12-20 18:15:40 -05:00
Cory Wright ab0cba603d Rewrite of vif_rules.py to meet coding standards and be more pythonic in
general.  Use absolute paths for iptables/ebtables/arptables in host-rules.
2010-12-20 17:24:08 -05:00
Antony Messerli 2462eab6f0 initial commit of xenserver host protections 2010-12-20 10:56:10 -06:00