aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/resource/linux/file.py
diff options
context:
space:
mode:
Diffstat (limited to 'vicn/resource/linux/file.py')
-rw-r--r--vicn/resource/linux/file.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/vicn/resource/linux/file.py b/vicn/resource/linux/file.py
index cddda8ed..44b4b5be 100644
--- a/vicn/resource/linux/file.py
+++ b/vicn/resource/linux/file.py
@@ -37,14 +37,16 @@ class File(Resource):
"""
Resource: File
"""
- filename = Attribute(String, description = 'Path to the file',
+ filename = Attribute(String, description = 'Path to the file',
+ key = True,
mandatory = True)
node = Attribute(Node, description = 'Node on which the file is created',
mandatory = True,
multiplicity = Multiplicity.ManyToOne,
reverse_name = 'files',
+ key = True,
reverse_description = 'Files created on the node')
- overwrite = Attribute(Bool,
+ overwrite = Attribute(Bool,
description = 'Determines whether an existing file is overwritten',
default = False)
@@ -53,13 +55,12 @@ class File(Resource):
#--------------------------------------------------------------------------
def __get__(self):
-
# UGLY
@inline_task
def not_found():
raise ResourceNotFound
- if self.overwrite:
+ if self.overwrite:
return not_found()
def is_path (rv):