File tree Expand file tree Collapse file tree 5 files changed +17
-50
lines changed
Expand file tree Collapse file tree 5 files changed +17
-50
lines changed Original file line number Diff line number Diff line change 3131 'openstack_region' : False ,
3232 'base_image_id' : False ,
3333 'base_flavor_id' : False ,
34+ 'openstack_user_domain_name' : False ,
35+ 'openstack_project_domain_name' : False ,
3436}
3537
3638prepare_test (secrets = SECRETS_TO_CREATE )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1818import copy
1919import logging
2020import base64
21- import binascii
2221import inspect
2322import re
2423
3433from cloudify .constants import NODE_INSTANCE , RELATIONSHIP_INSTANCE
3534
3635# Py2/3 compatibility
37- from openstack_sdk ._compat import text_type , PY2
36+ from openstack_sdk ._compat import text_type
3837
3938
4039# Local imports
@@ -213,17 +212,6 @@ def resolve_ctx(_ctx):
213212 return _ctx
214213
215214
216- def is_userdata_encoded (userdata_string ):
217- try :
218- if PY2 :
219- base64 .decodestring (userdata_string )
220- else :
221- base64 .decodebytes (userdata_string .encode ('utf-8' ))
222- except binascii .Error :
223- return False
224- return True
225-
226-
227215def handle_userdata (existing_userdata ):
228216 """
229217 This method will be responsible for handle user data provided by the
@@ -247,7 +235,7 @@ def handle_userdata(existing_userdata):
247235
248236 if not existing_userdata :
249237 existing_userdata = ''
250- elif is_userdata_encoded ( existing_userdata ) :
238+ elif not ctx . node . properties [ 'encode_user_data' ] :
251239 return existing_userdata
252240
253241 if install_agent_userdata and os_family == 'windows' :
@@ -290,7 +278,8 @@ def handle_userdata(existing_userdata):
290278 final_userdata = compute .create_multi_mimetype_userdata (
291279 [existing_userdata , install_agent_userdata ])
292280
293- final_userdata = base64 .b64encode (final_userdata )
281+ final_userdata = base64 .b64encode (final_userdata .encode ('utf-8' )).decode (
282+ 'ascii' )
294283 return final_userdata
295284
296285
Original file line number Diff line number Diff line change 22
33 openstack :
44 executor : central_deployment_agent
5- source : https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/3.2.14 .zip
5+ source : https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/3.2.15 .zip
66 package_name : cloudify-openstack-plugin
7- package_version : ' 3.2.14 '
7+ package_version : ' 3.2.15 '
88
99dsl_definitions :
1010
@@ -391,6 +391,7 @@ data_types:
391391 Must be Base64 encoded. Restricted to 65535 bytes.
392392 required : false
393393 type : string
394+
394395 metadata :
395396 description : >
396397 Metadata key and value pairs.
@@ -1047,6 +1048,13 @@ node_types:
10471048 type : cloudify.types.openstack.Server
10481049 description : A dictionary that may contain these keys https://developer.openstack.org/api-ref/compute/?expanded=create-server-detail
10491050 required : true
1051+ encode_user_data :
1052+ required : false
1053+ type : boolean
1054+ default : true
1055+ description : >
1056+ A boolean describing if the plugin will encode the user_data given in resource_config.
1057+ if the user data is bae64 encoded and this flag is false, the user_data that accepted will be sent as the server user_data.
10501058 use_password :
10511059 type : boolean
10521060 default : false
Original file line number Diff line number Diff line change 2020
2121setup (
2222 name = 'cloudify-openstack-plugin' ,
23- version = '3.2.14 ' ,
23+ version = '3.2.15 ' ,
2424 author = 'Cloudify' ,
25252626 license = 'LICENSE' ,
You can’t perform that action at this time.
0 commit comments