lib/chef/knife/ionoscloud_share_create.rb in knife-ionoscloud-5.1.1 vs lib/chef/knife/ionoscloud_share_create.rb in knife-ionoscloud-5.1.2

- old
+ new

@@ -16,11 +16,10 @@ short: '-R RESOURCE_ID', long: '--resource-id RESOURCE_ID', description: 'The ID of the resource.' option :edit_privilege, - short: '-e', long: '--edit', description: 'The group has permission to edit privileges on this resource.' option :share_privilege, short: '-s', @@ -48,25 +47,21 @@ user_management_api = Ionoscloud::UserManagementApi.new(api_client) share, _, headers = user_management_api.um_groups_shares_post_with_http_info( config[:group_id], config[:resource_id], - { - properties: { - editPrivilege: config[:edit_privilege], - sharePrivilege: config[:share_privilege], - }.compact, - }, + Ionoscloud::GroupShare.new( + properties: Ionoscloud::GroupShareProperties.new( + edit_privilege: config[:edit_privilege], + share_privilege: config[:share_privilege], + ), + ), ) dot = ui.color('.', :magenta) api_client.wait_for { print dot; is_done? get_request_id headers } - puts "\n" - puts "#{ui.color('ID', :cyan)}: #{share.id}" - puts "#{ui.color('Edit Privilege', :cyan)}: #{share.properties.edit_privilege.to_s}" - puts "#{ui.color('Share Privilege', :cyan)}: #{share.properties.share_privilege.to_s}" - puts 'done' + print_share(share) end end end end