X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=db-config;h=dc984cb3a3193202048e857252a2ce71e7a3a038;hb=c3f2b0ae1254f9dc021bb8f6bbf7efd2f34e8e97;hp=682962a4c4d293625ce424528257ad0df3003fc5;hpb=5353205e869c6fb938c4f97d26287271e9133c5f;p=myplc.git diff --git a/db-config b/db-config index 682962a..dc984cb 100755 --- a/db-config +++ b/db-config @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id$ +# $Id: db-config,v 1.11 2006/12/12 10:13:31 thierry Exp $ # from plc_config import PLCConfiguration @@ -587,7 +587,7 @@ def main(): plc_ticket_pubkey = '%KEY%' # Create/update system slices - default_slices = [ + legacy_slices = [ # XXX Required for old Node Manager {'name': "pl_conf", 'description': "PlanetLab Slice Creation Service (SCS)", @@ -609,7 +609,8 @@ def main(): 'attributes': [('cpu_share', "32"), ('plc_slice_type', "VServerSlice"), ('disk_max', "5000000")]}, - + ] + default_slices = [ # PlanetFlow {'name': plc['slice_prefix'] + "_netflow", 'description': "PlanetFlow Traffic Auditing Service", @@ -624,7 +625,19 @@ def main(): ('proper_op', "bind_socket")]}, ] - + ### xxx - to review once new node manager rolls out + # if PLC_SLICE_PREFIX is left to default - this is meant for the public PL only + if plc['slice_prefix'] == 'pl': + # create both legacy slices together with netflow through default_slices + default_slices += legacy_slices + else: + # we use another slice prefix : disable legacy slices if already created + for legacy_slice in legacy_slices: + try: + DeleteSlice(legacy_slice['name']) + except: + pass + for default_slice in default_slices: slices = GetSlices([default_slice['name']]) if slices: