From a880dce009c66f53f08b76fc6ddd8df31be2504d Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 7 Apr 2010 20:32:52 +0000 Subject: [PATCH] install pl rspec schema (pl.rng) in /etc/sfa. Add variable to default config file (default_config.xml) that defines where this file lives --- TODO | 6 +++--- config/default_config.xml | 6 ++++++ setup.py | 3 ++- sfa/managers/aggregate_manager_pl.py | 3 ++- sfa/server/interface.py | 5 ++++- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 99db1ad4..7f442ee6 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,6 @@ * a recently disabled/deleted user may still have a valid cred. Keep a list of valid/invalid users on the aggregate and check callers against this list - Component manager - * only call get_gids() if there are slices with no gids installed * GetTicket - must verify_{site,slice,person,keys} on remote aggregate * Redeem ticket - RedeemTicket/AdminTicket not working. Why? * install the slice and node gid when the slice is created (create NM plugin to execute sfa_component_setup.py ?) @@ -17,11 +16,12 @@ slices were on it and recreate them? do we make some sort of transaction log) - Registry -* sfa.plc.api.SfaAPI.fill_record_pl_info() should add the sites PIs to a slice records researchers list +* sign peer gids * update call should attempt to push updates to federated peers if the peer has a record for an object that is updated locally * api.update_membership() shoudl behave more like resolve when looking up records (attempt to resolve records at federated registeries) instead of only looking in the local registry -* support generic registry records (dont depend on postgres!) +* move db tables into db with less overhead (tokyocabinet?) +* make resolve, fill_record_info more fault tolerent. Skip records with failures - Auth Service * develop a simple service where users auth using username/passord and diff --git a/config/default_config.xml b/config/default_config.xml index 02f48e3a..79d6955e 100644 --- a/config/default_config.xml +++ b/config/default_config.xml @@ -106,6 +106,12 @@ $URL$ The type of backend server for this aggregate. Some aggregates may not be myplc. + + + RSpec Schema + /etc/sfa/pl.rng + The path to the default schema + Hostname diff --git a/setup.py b/setup.py index eb94e805..77e64918 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,8 @@ package_dirs = [ data_files = [('/etc/sfa/', [ 'config/aggregates.xml', 'config/registries.xml', 'config/default_config.xml', - 'config/sfi_config']), + 'config/sfi_config', + 'sfa/managers/pl/pl.rng']), ('/etc/sfatables/matches/', glob('sfatables/matches/*.xml')), ('/etc/sfatables/targets/', glob('sfatables/targets/*.xml')), ('/etc/init.d/', ['sfa/init.d/sfa', 'sfa/init.d/sfa-cm'])] diff --git a/sfa/managers/aggregate_manager_pl.py b/sfa/managers/aggregate_manager_pl.py index cde20b2a..2ca9db4f 100644 --- a/sfa/managers/aggregate_manager_pl.py +++ b/sfa/managers/aggregate_manager_pl.py @@ -67,7 +67,8 @@ def create_slice(api, xrn, xml): slice = network.get_slice(api, hrn) current = __get_hostnames(slice.get_nodes()) - network.addRSpec(xml, "/var/www/html/schemas/pl.rng") + network.addRSpec(xml, api.config.SFA_AGGREGATE_RSPEC_SCHEMA) + request = __get_hostnames(network.nodesWithSlivers()) # remove nodes not in rspec diff --git a/sfa/server/interface.py b/sfa/server/interface.py index 9b4c039a..7172ef97 100644 --- a/sfa/server/interface.py +++ b/sfa/server/interface.py @@ -127,7 +127,10 @@ class Interfaces(dict): the db. """ # get hrns we expect to find - hrns_expected = [interface['hrn'] for interface in self.interfaces] + # ignore records for local interfaces + ignore_interfaces = [self.api.config.SFA_INTERFACE_HRN] + hrns_expected = [interface['hrn'] for interface in self.interfaces \ + if interface['hrn'] not in ignore_interfaces] # get hrns that actually exist in the db table = SfaTable() -- 2.43.0