8
8
import indykite_sdk .utils .logger as logger
9
9
10
10
11
- def read_application_by_id (self , application_id , bookmarks = [] ):
11
+ def read_application_by_id (self , application_id ):
12
12
"""
13
13
get an Application object with an id
14
14
:param self:
15
15
:param application_id: string gid id
16
- :param bookmarks: list of strings with pattern: ^[a-zA-Z0-9_-]{40,}$
17
16
:return: Application object
18
17
"""
19
18
sys .excepthook = logger .handle_excepthook
20
19
try :
21
20
response = self .stub .ReadApplication (
22
21
pb2 .ReadApplicationRequest (
23
- id = str (application_id ),
24
- bookmarks = bookmarks
22
+ id = str (application_id )
25
23
)
26
24
)
27
25
except Exception as exception :
@@ -33,13 +31,12 @@ def read_application_by_id(self, application_id, bookmarks=[]):
33
31
return Application .deserialize (response .application )
34
32
35
33
36
- def read_application_by_name (self , app_space_id , application_name , bookmarks = [] ):
34
+ def read_application_by_name (self , app_space_id , application_name ):
37
35
"""
38
36
get an Application object with a name
39
37
:param self:
40
38
:param app_space_id: string gid id
41
39
:param application_name: string
42
- :param bookmarks: list of strings with pattern: ^[a-zA-Z0-9_-]{40,}$
43
40
:return: Application object
44
41
"""
45
42
sys .excepthook = logger .handle_excepthook
@@ -49,8 +46,7 @@ def read_application_by_name(self, app_space_id, application_name, bookmarks=[])
49
46
name = UniqueNameIdentifier (
50
47
location = app_space_id ,
51
48
name = application_name
52
- ),
53
- bookmarks = bookmarks
49
+ )
54
50
)
55
51
)
56
52
except Exception as exception :
@@ -62,15 +58,14 @@ def read_application_by_name(self, app_space_id, application_name, bookmarks=[])
62
58
return Application .deserialize (response .application )
63
59
64
60
65
- def create_application (self , app_space_id , name , display_name , description = "" , bookmarks = [] ):
61
+ def create_application (self , app_space_id , name , display_name , description = "" ):
66
62
"""
67
63
create an Application
68
64
:param self:
69
65
:param app_space_id: string gid id
70
66
:param name: string pattern: ^[a-z](?:[-a-z0-9]{0,61}[a-z0-9])$
71
67
:param display_name: string
72
68
:param description: string
73
- :param bookmarks: list of strings with pattern: ^[a-zA-Z0-9_-]{40,}$
74
69
:return: deserialized CreateApplicationResponse
75
70
"""
76
71
sys .excepthook = logger .handle_excepthook
@@ -80,8 +75,7 @@ def create_application(self, app_space_id, name, display_name, description="", b
80
75
app_space_id = app_space_id ,
81
76
name = name ,
82
77
display_name = wrappers .StringValue (value = display_name ),
83
- description = wrappers .StringValue (value = description ),
84
- bookmarks = bookmarks
78
+ description = wrappers .StringValue (value = description )
85
79
)
86
80
)
87
81
except Exception as exception :
@@ -93,15 +87,14 @@ def create_application(self, app_space_id, name, display_name, description="", b
93
87
return CreateApplication .deserialize (response , app_space_id , name )
94
88
95
89
96
- def update_application (self , application_id , etag , display_name , description = "" , bookmarks = [] ):
90
+ def update_application (self , application_id , etag , display_name , description = "" ):
97
91
"""
98
92
update existing Application
99
93
:param self:
100
94
:param application_id: string gid id
101
95
:param etag: string
102
96
:param display_name: string
103
97
:param description: string
104
- :param bookmarks: list of strings with pattern: ^[a-zA-Z0-9_-]{40,}$
105
98
:return: deserialized UpdateApplicationResponse
106
99
"""
107
100
sys .excepthook = logger .handle_excepthook
@@ -111,8 +104,7 @@ def update_application(self, application_id, etag, display_name, description="",
111
104
id = application_id ,
112
105
etag = wrappers .StringValue (value = etag ),
113
106
display_name = wrappers .StringValue (value = display_name ),
114
- description = wrappers .StringValue (value = description ),
115
- bookmarks = bookmarks
107
+ description = wrappers .StringValue (value = description )
116
108
)
117
109
)
118
110
except Exception as exception :
@@ -124,22 +116,20 @@ def update_application(self, application_id, etag, display_name, description="",
124
116
return UpdateApplication .deserialize (response )
125
117
126
118
127
- def list_applications (self , app_space_id , match = [], bookmarks = [] ):
119
+ def list_applications (self , app_space_id , match = []):
128
120
"""
129
121
list App which match exact name in match param
130
122
:param self:
131
123
:param app_space_id: string gid id
132
124
:param match: list of strings
133
- :param bookmarks: list of strings with pattern: ^[a-zA-Z0-9_-]{40,}$
134
125
:return: ListApplicationResponse object
135
126
"""
136
127
sys .excepthook = logger .handle_excepthook
137
128
try :
138
129
streams = self .stub .ListApplications (
139
130
pb2 .ListApplicationsRequest (
140
131
app_space_id = app_space_id ,
141
- match = match ,
142
- bookmarks = bookmarks
132
+ match = match
143
133
)
144
134
)
145
135
except Exception as exception :
@@ -158,22 +148,20 @@ def list_applications(self, app_space_id, match=[], bookmarks=[]):
158
148
return responses
159
149
160
150
161
- def delete_application (self , application_id , etag , bookmarks ):
151
+ def delete_application (self , application_id , etag ):
162
152
"""
163
153
delete an application
164
154
:param self:
165
155
:param application_id: string gid id
166
156
:param etag: string
167
- :param bookmarks: list of strings with pattern: ^[a-zA-Z0-9_-]{40,}$
168
157
:return: DeleteApplicationResponse
169
158
"""
170
159
sys .excepthook = logger .handle_excepthook
171
160
try :
172
161
response = self .stub .DeleteApplication (
173
162
pb2 .DeleteApplicationRequest (
174
163
id = application_id ,
175
- etag = wrappers .StringValue (value = etag ),
176
- bookmarks = bookmarks
164
+ etag = wrappers .StringValue (value = etag )
177
165
)
178
166
)
179
167
except Exception as exception :
0 commit comments