@@ -76,21 +76,21 @@ def setup_class(cls):
76
76
)
77
77
78
78
@needscredentials
79
- def test_get_instance_by_id_example (self ):
79
+ def test_get_instance_example (self ):
80
80
"""
81
- get_instance_by_id request example
81
+ get_instance request example
82
82
"""
83
83
try :
84
- print ('\n get_instance_by_id () result:' )
85
- # begin-get_instance_by_id
84
+ print ('\n get_instance () result:' )
85
+ # begin-get_instance
86
86
87
- instance_details = ibm_analytics_engine_api_service .get_instance_by_id (
88
- instance_id = 'testString '
87
+ instance = ibm_analytics_engine_api_service .get_instance (
88
+ instance_id = 'e64c907a-e82f-46fd-addc-ccfafbd28b09 '
89
89
).get_result ()
90
90
91
- print (json .dumps (instance_details , indent = 2 ))
91
+ print (json .dumps (instance , indent = 2 ))
92
92
93
- # end-get_instance_by_id
93
+ # end-get_instance
94
94
95
95
except ApiException as e :
96
96
pytest .fail (str (e ))
@@ -104,8 +104,14 @@ def test_create_application_example(self):
104
104
print ('\n create_application() result:' )
105
105
# begin-create_application
106
106
107
+ application_request_application_details_model = {
108
+ 'application' : '/opt/ibm/spark/examples/src/main/python/wordcount.py' ,
109
+ 'arguments' : ['/opt/ibm/spark/examples/src/main/resources/people.txt' ]
110
+ }
111
+
107
112
application_response = ibm_analytics_engine_api_service .create_application (
108
- instance_id = 'testString' ,
113
+ instance_id = 'e64c907a-e82f-46fd-addc-ccfafbd28b09' ,
114
+ application_details = application_request_application_details_model ,
109
115
).get_result ()
110
116
111
117
print (json .dumps (application_response , indent = 2 ))
@@ -116,42 +122,42 @@ def test_create_application_example(self):
116
122
pytest .fail (str (e ))
117
123
118
124
@needscredentials
119
- def test_get_applications_example (self ):
125
+ def test_list_applications_example (self ):
120
126
"""
121
- get_applications request example
127
+ list_applications request example
122
128
"""
123
129
try :
124
- print ('\n get_applications () result:' )
125
- # begin-get_applications
130
+ print ('\n list_applications () result:' )
131
+ # begin-list_applications
126
132
127
- application_collection = ibm_analytics_engine_api_service .get_applications (
128
- instance_id = 'testString '
133
+ application_collection = ibm_analytics_engine_api_service .list_applications (
134
+ instance_id = 'e64c907a-e82f-46fd-addc-ccfafbd28b09 '
129
135
).get_result ()
130
136
131
137
print (json .dumps (application_collection , indent = 2 ))
132
138
133
- # end-get_applications
139
+ # end-list_applications
134
140
135
141
except ApiException as e :
136
142
pytest .fail (str (e ))
137
143
138
144
@needscredentials
139
- def test_get_application_by_id_example (self ):
145
+ def test_get_application_example (self ):
140
146
"""
141
- get_application_by_id request example
147
+ get_application request example
142
148
"""
143
149
try :
144
- print ('\n get_application_by_id () result:' )
145
- # begin-get_application_by_id
150
+ print ('\n get_application () result:' )
151
+ # begin-get_application
146
152
147
- application_get_response = ibm_analytics_engine_api_service .get_application_by_id (
148
- instance_id = 'testString ' ,
149
- application_id = 'testString '
153
+ application_get_response = ibm_analytics_engine_api_service .get_application (
154
+ instance_id = 'e64c907a-e82f-46fd-addc-ccfafbd28b09 ' ,
155
+ application_id = 'ff48cc19-0e7e-4627-aac6-0b4ad080397b '
150
156
).get_result ()
151
157
152
158
print (json .dumps (application_get_response , indent = 2 ))
153
159
154
- # end-get_application_by_id
160
+ # end-get_application
155
161
156
162
except ApiException as e :
157
163
pytest .fail (str (e ))
@@ -166,8 +172,8 @@ def test_get_application_state_example(self):
166
172
# begin-get_application_state
167
173
168
174
application_get_state_response = ibm_analytics_engine_api_service .get_application_state (
169
- instance_id = 'testString ' ,
170
- application_id = 'testString '
175
+ instance_id = 'e64c907a-e82f-46fd-addc-ccfafbd28b09 ' ,
176
+ application_id = 'ff48cc19-0e7e-4627-aac6-0b4ad080397b '
171
177
).get_result ()
172
178
173
179
print (json .dumps (application_get_state_response , indent = 2 ))
@@ -178,20 +184,20 @@ def test_get_application_state_example(self):
178
184
pytest .fail (str (e ))
179
185
180
186
@needscredentials
181
- def test_delete_application_by_id_example (self ):
187
+ def test_delete_application_example (self ):
182
188
"""
183
- delete_application_by_id request example
189
+ delete_application request example
184
190
"""
185
191
try :
186
- # begin-delete_application_by_id
192
+ # begin-delete_application
187
193
188
- response = ibm_analytics_engine_api_service .delete_application_by_id (
189
- instance_id = 'testString ' ,
190
- application_id = 'testString '
194
+ response = ibm_analytics_engine_api_service .delete_application (
195
+ instance_id = 'e64c907a-e82f-46fd-addc-ccfafbd28b09 ' ,
196
+ application_id = 'ff48cc19-0e7e-4627-aac6-0b4ad080397b '
191
197
)
192
198
193
- # end-delete_application_by_id
194
- print ('\n delete_application_by_id () response status code: ' , response .get_status_code ())
199
+ # end-delete_application
200
+ print ('\n delete_application () response status code: ' , response .get_status_code ())
195
201
196
202
except ApiException as e :
197
203
pytest .fail (str (e ))
0 commit comments