From 3745cb84968690bdfc76d49ffb2c24538c1b278b Mon Sep 17 00:00:00 2001 From: Abrar Rahman Protyasha Date: Tue, 6 Jul 2021 17:46:56 -0400 Subject: [PATCH] (Default permissions): Adding support for lifecycle nodes Signed-off-by: Abrar Rahman Protyasha --- nodl_to_policy/_common/lifecycle_node.xml | 16 ++++++++++++++++ nodl_to_policy/types.py | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 nodl_to_policy/_common/lifecycle_node.xml create mode 100644 nodl_to_policy/types.py diff --git a/nodl_to_policy/_common/lifecycle_node.xml b/nodl_to_policy/_common/lifecycle_node.xml new file mode 100644 index 0000000..6dbe1c0 --- /dev/null +++ b/nodl_to_policy/_common/lifecycle_node.xml @@ -0,0 +1,16 @@ + + + + + + ~/change_state + ~/get_available_states + ~/get_available_transitions + ~/get_state + ~/get_transition_graph + + + ~/transition_event + + diff --git a/nodl_to_policy/types.py b/nodl_to_policy/types.py new file mode 100644 index 0000000..aa7988f --- /dev/null +++ b/nodl_to_policy/types.py @@ -0,0 +1,21 @@ +# Copyright 2021 Open Source Robotics Foundation, Inc. +# +# 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. + +from enum import Enum, unique + + +@unique +class NodeType(Enum): + NODE = 'node' + LIFECYCLE_NODE = 'lifecycle_node'