Excise M2Crypto!

This required rewriting our Diffie-Hellman-Merkle implementation for
set_admin_password in xen. Fixes bug 917851.

Change-Id: Ic4cdcc06221f003aec2dcd5ba05a1a9ad19d39c9
This commit is contained in:
Brian Waldon
2012-01-31 20:50:48 -08:00
parent baae80bb48
commit b45c84282a
2 changed files with 12 additions and 28 deletions

View File

@@ -54,22 +54,16 @@ Install the prerequisite packages.
On Ubuntu::
sudo apt-get install python-dev swig libssl-dev python-pip git-core
sudo apt-get install python-dev libssl-dev python-pip git-core
On Fedora-based distributions (e.g., Fedora/RHEL/CentOS/Scientific Linux)::
sudo yum install python-devel swig openssl-devel python-pip git
sudo yum install python-devel openssl-devel python-pip git
Mac OS X Systems
----------------
Install swig, which is needed to build the M2Crypto Python package. If you are
using the `homebrew <http://mxcl.github.com/homebrew/>`_, package manager,
install swig by doing::
brew install swig
Install virtualenv::
sudo easy_install virtualenv
@@ -120,7 +114,7 @@ You can manually install the virtual environment instead of having
This will install all of the Python packages listed in the
``tools/pip-requires`` file into your virtualenv. There will also be some
additional packages (pip, distribute, greenlet, M2Crypto) that are installed
additional packages (pip, distribute, greenlet) that are installed
by the ``tools/install_venv.py`` file into the virutalenv.
If all goes well, you should get a message something like this::

View File

@@ -22,8 +22,6 @@ Weighing Functions.
import json
import operator
import M2Crypto
from novaclient import v1_1 as novaclient
from novaclient import exceptions as novaclient_exceptions
from nova import crypto
@@ -43,11 +41,6 @@ FLAGS = flags.FLAGS
LOG = logging.getLogger('nova.scheduler.distributed_scheduler')
class InvalidBlob(exception.NovaException):
message = _("Ill-formed or incorrectly routed 'blob' data sent "
"to instance create request.")
class DistributedScheduler(driver.Scheduler):
"""Scheduler that can work across any nova deployment, from simple
deployments to multiple nested zones.
@@ -185,19 +178,16 @@ class DistributedScheduler(driver.Scheduler):
or None if invalid. Broken out for testing.
"""
decryptor = crypto.decryptor(FLAGS.build_plan_encryption_key)
try:
json_entry = decryptor(blob)
# Extract our WeightedHost values
wh_dict = json.loads(json_entry)
host = wh_dict.get('host', None)
blob = wh_dict.get('blob', None)
zone = wh_dict.get('zone', None)
return least_cost.WeightedHost(wh_dict['weight'],
host_state=host_manager.HostState(host, 'compute'),
blob=blob, zone=zone)
json_entry = decryptor(blob)
except M2Crypto.EVP.EVPError:
raise InvalidBlob()
# Extract our WeightedHost values
wh_dict = json.loads(json_entry)
host = wh_dict.get('host', None)
blob = wh_dict.get('blob', None)
zone = wh_dict.get('zone', None)
return least_cost.WeightedHost(wh_dict['weight'],
host_state=host_manager.HostState(host, 'compute'),
blob=blob, zone=zone)
def _ask_child_zone_to_create_instance(self, context, weighted_host,
request_spec, kwargs):