From 2151a5d6d034e323ede042060102570e778a2b4a Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 29 Jun 2012 17:07:52 -0400 Subject: [PATCH] plos schema --- sfa/openstack/nova_shell.py | 39 ----------------------- sfa/rspecs/extensions/ext/plos/1/plos.rnc | 15 +++++++++ sfa/rspecs/extensions/ext/plos/1/plos.xsd | 16 ++++++++++ 3 files changed, 31 insertions(+), 39 deletions(-) delete mode 100644 sfa/openstack/nova_shell.py create mode 100644 sfa/rspecs/extensions/ext/plos/1/plos.rnc create mode 100644 sfa/rspecs/extensions/ext/plos/1/plos.xsd diff --git a/sfa/openstack/nova_shell.py b/sfa/openstack/nova_shell.py deleted file mode 100644 index 7fab67f8..00000000 --- a/sfa/openstack/nova_shell.py +++ /dev/null @@ -1,39 +0,0 @@ -import sys -import xmlrpclib -import socket -import gettext -from urlparse import urlparse -from sfa.util.sfalogging import logger -from sfa.util.config import Config - -try: - from sfa.openstack.client import GlanceClient, NovaClient, KeystoneClient - has_nova = True -except: - has_nova = False - - - -class Shell: - """ - A simple native shell to a nova backend. - This class can receive all nova calls to the underlying testbed - """ - - # dont care about limiting calls yet - direct_calls = [] - alias_calls = {} - - - # use the 'capability' auth mechanism for higher performance when the PLC db is local - def __init__ ( self, config=None) : - if not config: - config = Config() - if has_nova: - # instantiate managers - self.auth_manager = KeystoneClient(config) - self.image_manager = GlanceClient(config) - self.nova_manager = NovaClient(config) - else: - logger.debug('nova access - REST') - raise SfaNotImplemented('nova access - Rest') diff --git a/sfa/rspecs/extensions/ext/plos/1/plos.rnc b/sfa/rspecs/extensions/ext/plos/1/plos.rnc new file mode 100644 index 00000000..a68113f4 --- /dev/null +++ b/sfa/rspecs/extensions/ext/plos/1/plos.rnc @@ -0,0 +1,15 @@ +# +# Extensions for PlanetLab Resources +# Version 1 +# + +namespace plos = "http://www.planet-lab.org/resources/sfa/ext/plos/1" + +FWRuleSpec = element plos:attribute { + attribute protocol { text }, + attribute port_range { text }, + attribute cidr_ip { text } +} + +start = FWRuleSpec + diff --git a/sfa/rspecs/extensions/ext/plos/1/plos.xsd b/sfa/rspecs/extensions/ext/plos/1/plos.xsd new file mode 100644 index 00000000..3177eac6 --- /dev/null +++ b/sfa/rspecs/extensions/ext/plos/1/plos.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + -- 2.43.0