Skip to content

Commit aebd630

Browse files
committed
update to add from_context to edge-path
1 parent 98c6532 commit aebd630

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cterasdk/cio/edge/types.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ class EdgePath(BasePath):
77
"""
88
Edge Filer Path Object
99
"""
10+
Namespace = '/'
1011

11-
def __init__(self, scope, reference):
12-
super().__init__(scope, reference or '.')
12+
@staticmethod
13+
def from_context(reference):
14+
return EdgePath(EdgePath.Namespace, reference)
1315

1416

1517
class EdgeResource(BaseResource):
@@ -58,7 +60,7 @@ def resolve(path):
5860
return path.path
5961

6062
if path is None or isinstance(path, str):
61-
return EdgePath(path)
63+
return EdgePath.from_context(path)
6264

6365
raise ValueError(f'Error: Could not resolve path: {path}. Type: {type(path)}')
6466

0 commit comments

Comments
 (0)