diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-07-01 17:38:03 -0500 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-07-01 17:38:03 -0500 |
| commit | d40990eceecb0eae4906ad5c923b421d4f4c1075 (patch) | |
| tree | 7b8c32802a29466938ea10f65219332b748828b9 | |
| parent | 55def9c6b99514655330eb9c4d70fe09146ce36a (diff) | |
| parent | ea9b913ccceda5944c881f3ce9cadde39b0e0344 (diff) | |
| download | nova-d40990eceecb0eae4906ad5c923b421d4f4c1075.tar.gz nova-d40990eceecb0eae4906ad5c923b421d4f4c1075.tar.xz nova-d40990eceecb0eae4906ad5c923b421d4f4c1075.zip | |
Merge remote branch 'nova/master'
Conflicts:
docs/getting.started.rst
| -rw-r--r-- | docs/getting.started.rst | 19 | ||||
| -rw-r--r-- | nova/auth/users.py | 2 | ||||
| -rw-r--r-- | nova/compute/node.py | 25 |
3 files changed, 14 insertions, 32 deletions
diff --git a/docs/getting.started.rst b/docs/getting.started.rst index f2f1dde44..55a73dd00 100644 --- a/docs/getting.started.rst +++ b/docs/getting.started.rst @@ -1,22 +1,3 @@ -.. - Copyright 2010 United States Government as represented by the - Administrator of the National Aeronautics and Space Administration. - All Rights Reserved. - - Copyright 2010 Anso Labs, LLC - - Licensed under the Apache License, Version 2.0 (the "License"); you may - not use this file except in compliance with the License. You may obtain - a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations - under the License. - Getting Started with Nova ========================= diff --git a/nova/auth/users.py b/nova/auth/users.py index 6997596aa..e60fc7d1a 100644 --- a/nova/auth/users.py +++ b/nova/auth/users.py @@ -481,7 +481,7 @@ class UserManager(object): def __cert_subject(self, uid): # FIXME(ja) - this should be pulled from a global configuration - return "/C=US/ST=California/L=Mountain View/O=Anso Labs/OU=Nova Dev/CN=%s-%s" % (uid, str(datetime.datetime.utcnow().isoformat())) + return "/C=US/ST=California/L=MountainView/O=AnsoLabs/OU=NovaDev/CN=%s-%s" % (uid, str(datetime.datetime.utcnow().isoformat())) class LDAPWrapper(object): diff --git a/nova/compute/node.py b/nova/compute/node.py index c217056f5..65eb4bf3e 100644 --- a/nova/compute/node.py +++ b/nova/compute/node.py @@ -30,7 +30,7 @@ import base64 import json import logging import os -import random +import shutil import sys from nova import vendor @@ -153,7 +153,8 @@ class Node(object, service.Service): inst = self.instdir.get(instance_id) # TODO: Get the real security group of launch in here security_group = "default" - net = network.BridgedNetwork.get_network_for_project(inst['user_id'], inst['project_id'], + net = network.BridgedNetwork.get_network_for_project(inst['user_id'], + inst['project_id'], security_group).express() inst['node_name'] = FLAGS.node_name inst.save() @@ -333,7 +334,7 @@ class Instance(object): @property def name(self): - return self._s['name'] + return self.datamodel['name'] def is_pending(self): return (self.state == Instance.NOSTATE or self.state == 'pending') @@ -346,7 +347,7 @@ class Instance(object): return (self.state == Instance.RUNNING or self.state == 'running') def describe(self): - return self._s + return self.datamodel def info(self): logging.debug("Getting info for dom %s" % self.name) @@ -360,7 +361,7 @@ class Instance(object): 'node_name': FLAGS.node_name} def basepath(self, path=''): - return os.path.abspath(os.path.join(self._s['basepath'], path)) + return os.path.abspath(os.path.join(self.datamodel['basepath'], path)) def update_state(self): self.datamodel.update(self.info()) @@ -450,13 +451,13 @@ class Instance(object): @defer.inlineCallbacks def _create_image(self, libvirt_xml): # syntactic nicety - data = self._s + data = self.datamodel basepath = self.basepath # ensure directories exist and are writable yield self._pool.simpleExecute('mkdir -p %s' % basepath()) yield self._pool.simpleExecute('chmod 0777 %s' % basepath()) - + # TODO(termie): these are blocking calls, it would be great # if they weren't. @@ -464,11 +465,11 @@ class Instance(object): f = open(basepath('libvirt.xml'), 'w') f.write(libvirt_xml) f.close() - + if FLAGS.fake_libvirt: logging.info('fake_libvirt, nothing to do for create_image') raise defer.returnValue(None); - + if FLAGS.use_s3: _fetch_file = self._fetch_s3_image else: @@ -495,7 +496,7 @@ class Instance(object): * 1024 * 1024 * 1024) yield disk.partition( basepath('disk-raw'), basepath('disk'), bytes, execute=execute) - + @defer.inlineCallbacks @exception.wrap_exception def spawn(self): @@ -506,7 +507,7 @@ class Instance(object): self.set_state(Instance.NOSTATE, 'launching') logging.info('self %s', self) try: - yield self._create_image(xml) + yield self._create_image(xml) self._conn.createXML(xml, 0) # TODO(termie): this should actually register # a callback to check for successful boot @@ -528,7 +529,7 @@ class Instance(object): local_d.callback(None) timer.f = _wait_for_boot timer.start(interval=0.5, now=True) - except Exception: + except Exception, ex: logging.debug(ex) self.set_state(Instance.SHUTDOWN) |
