diff options
author | Marco Capitani <m.capitani@nextworks.it> | 2017-04-11 15:53:49 +0200 |
---|---|---|
committer | Marco Capitani <m.capitani@nextworks.it> | 2017-04-11 15:53:49 +0200 |
commit | 46310717c3293054324cc6a0271d855b638df0ff (patch) | |
tree | 69b27a68b2d97962f3bcbdee40d412453285eea2 /rumba/prototypes/irati_templates.py | |
parent | 7f5054816fc68bca1d9d4901d1e365b57a278542 (diff) | |
download | rumba-46310717c3293054324cc6a0271d855b638df0ff.tar.gz rumba-46310717c3293054324cc6a0271d855b638df0ff.zip |
Resolving node_id issue and general cleanup
Diffstat (limited to 'rumba/prototypes/irati_templates.py')
-rw-r--r-- | rumba/prototypes/irati_templates.py | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/rumba/prototypes/irati_templates.py b/rumba/prototypes/irati_templates.py index 9b03abb..0f3ef05 100644 --- a/rumba/prototypes/irati_templates.py +++ b/rumba/prototypes/irati_templates.py @@ -1,21 +1,3 @@ -# -# Copyright (C) 2014-2017 Nextworks -# Author: Vincenzo Maffione <v.maffione@nextworks.it> -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - # Environment setup for VMs. Standard linux approach env_dict = {'installpath': '/usr', 'varpath': ''} @@ -274,14 +256,20 @@ def dtcp_ps_set(d, v, parms): policy_translator = { - 'rmt.pff': lambda d, v, p: ps_set(d["rmtConfiguration"]["pffConfiguration"], "policySet", v, p), + 'rmt.pff': lambda d, v, p: ps_set(d["rmtConfiguration"]["pffConfiguration"], + "policySet", v, p), 'rmt': lambda d, v, p: ps_set(d["rmtConfiguration"], "policySet", v, p), - 'enrollment-task': lambda d, v, p: ps_set(d["enrollmentTaskConfiguration"], "policySet", v, p), - 'flow-allocator': lambda d, v, p: ps_set(d["flowAllocatorConfiguration"], "policySet", v, p), - 'namespace-manager': lambda d, v, p: ps_set(d["namespaceManagerConfiguration"], "policySet", v, p), - 'security-manager': lambda d, v, p: ps_set(d["securityManagerConfiguration"], "policySet", v, p), + 'enrollment-task': lambda d, v, p: ps_set(d["enrollmentTaskConfiguration"], + "policySet", v, p), + 'flow-allocator': lambda d, v, p: ps_set(d["flowAllocatorConfiguration"], + "policySet", v, p), + 'namespace-manager': lambda d, v, p: ps_set( + d["namespaceManagerConfiguration"], "policySet", v, p), + 'security-manager': lambda d, v, p: ps_set( + d["securityManagerConfiguration"], "policySet", v, p), 'routing': lambda d, v, p: ps_set(d["routingConfiguration"], "policySet", v, p), - 'resource-allocator.pduftg': lambda d, v, p: ps_set(d["resourceAllocatorConfiguration"], "policySet", v, p), + 'resource-allocator.pduftg': lambda d, v, p: ps_set( + d["resourceAllocatorConfiguration"], "policySet", v, p), 'efcp.*.dtcp': None, 'efcp.*.dtp': None, } @@ -289,7 +277,8 @@ policy_translator = { def is_security_path(path): sp = path.split('.') - return (len(sp) == 3) and (sp[0] == 'security-manager') and (sp[1] in ['auth', 'encrypt', 'ttl', 'errorcheck']) + return (len(sp) == 3) and (sp[0] == 'security-manager') \ + and (sp[1] in ['auth', 'encrypt', 'ttl', 'errorcheck']) # Do we know this path ? |