gooddata 1.0.2-java → 1.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/CONTRIBUTING.md +12 -0
  4. data/README.md +5 -2
  5. data/Rakefile +0 -1
  6. data/dev-gooddata-sso.pub.encrypted +40 -0
  7. data/gooddata.gemspec +3 -3
  8. data/lib/gooddata/connection.rb +23 -13
  9. data/lib/gooddata/helpers/data_helper.rb +0 -1
  10. data/lib/gooddata/lcm/actions/apply_custom_maql.rb +8 -1
  11. data/lib/gooddata/lcm/actions/associate_clients.rb +8 -1
  12. data/lib/gooddata/lcm/actions/base_action.rb +10 -0
  13. data/lib/gooddata/lcm/actions/collect_ca_metrics.rb +7 -1
  14. data/lib/gooddata/lcm/actions/collect_client_projects.rb +3 -0
  15. data/lib/gooddata/lcm/actions/collect_clients.rb +3 -1
  16. data/lib/gooddata/lcm/actions/collect_data_product.rb +10 -2
  17. data/lib/gooddata/lcm/actions/collect_dynamic_schedule_params.rb +12 -1
  18. data/lib/gooddata/lcm/actions/collect_ldm_objects.rb +6 -2
  19. data/lib/gooddata/lcm/actions/collect_meta.rb +1 -1
  20. data/lib/gooddata/lcm/actions/collect_segment_clients.rb +8 -1
  21. data/lib/gooddata/lcm/actions/collect_segments.rb +6 -5
  22. data/lib/gooddata/lcm/actions/collect_tagged_objects.rb +1 -1
  23. data/lib/gooddata/lcm/actions/collect_users_brick_users.rb +10 -4
  24. data/lib/gooddata/lcm/actions/create_segment_masters.rb +12 -2
  25. data/lib/gooddata/lcm/actions/ensure_data_product.rb +10 -0
  26. data/lib/gooddata/lcm/actions/ensure_technical_users_domain.rb +5 -1
  27. data/lib/gooddata/lcm/actions/ensure_technical_users_project.rb +3 -0
  28. data/lib/gooddata/lcm/actions/execute_schedules.rb +10 -0
  29. data/lib/gooddata/lcm/actions/import_object_collections.rb +1 -1
  30. data/lib/gooddata/lcm/actions/provision_clients.rb +12 -2
  31. data/lib/gooddata/lcm/actions/purge_clients.rb +2 -0
  32. data/lib/gooddata/lcm/actions/rename_existing_client_projects.rb +3 -0
  33. data/lib/gooddata/lcm/actions/synchronize_attribute_drillpaths.rb +4 -1
  34. data/lib/gooddata/lcm/actions/synchronize_cas.rb +7 -1
  35. data/lib/gooddata/lcm/actions/synchronize_clients.rb +11 -1
  36. data/lib/gooddata/lcm/actions/synchronize_color_palette.rb +7 -1
  37. data/lib/gooddata/lcm/actions/synchronize_etls_in_segment.rb +12 -7
  38. data/lib/gooddata/lcm/actions/synchronize_label_types.rb +4 -1
  39. data/lib/gooddata/lcm/actions/synchronize_ldm.rb +18 -7
  40. data/lib/gooddata/lcm/actions/synchronize_meta.rb +9 -0
  41. data/lib/gooddata/lcm/actions/synchronize_new_segments.rb +11 -1
  42. data/lib/gooddata/lcm/actions/synchronize_processes.rb +7 -1
  43. data/lib/gooddata/lcm/actions/synchronize_schedules.rb +4 -1
  44. data/lib/gooddata/lcm/actions/synchronize_tag_objects.rb +6 -0
  45. data/lib/gooddata/lcm/actions/synchronize_user_filters.rb +60 -15
  46. data/lib/gooddata/lcm/actions/synchronize_user_groups.rb +7 -1
  47. data/lib/gooddata/lcm/actions/synchronize_users.rb +106 -3
  48. data/lib/gooddata/lcm/actions/update_release_table.rb +19 -0
  49. data/lib/gooddata/lcm/helpers/check_helper.rb +21 -6
  50. data/lib/gooddata/lcm/lcm2.rb +35 -22
  51. data/lib/gooddata/lcm/types/class/gd_logger.rb +23 -0
  52. data/lib/gooddata/lcm/types/class/gd_product.rb +23 -0
  53. data/lib/gooddata/lcm/types/class/gd_project.rb +23 -0
  54. data/lib/gooddata/lcm/types/class/smart_hash.rb +23 -0
  55. data/lib/gooddata/lcm/types/complex/segment.rb +1 -1
  56. data/lib/gooddata/lcm/types/scalar/integer.rb +2 -2
  57. data/lib/gooddata/lcm/types/special/any.rb +18 -0
  58. data/lib/gooddata/models/blueprint/dataset_blueprint.rb +1 -1
  59. data/lib/gooddata/models/blueprint/to_manifest.rb +1 -3
  60. data/lib/gooddata/models/blueprint/to_wire.rb +2 -1
  61. data/lib/gooddata/models/from_wire.rb +13 -1
  62. data/lib/gooddata/models/metadata/folder.rb +22 -0
  63. data/lib/gooddata/models/metadata/metric.rb +5 -8
  64. data/lib/gooddata/models/model.rb +1 -1
  65. data/lib/gooddata/models/process.rb +42 -32
  66. data/lib/gooddata/models/project.rb +19 -36
  67. data/lib/gooddata/models/project_creator.rb +3 -1
  68. data/lib/gooddata/models/project_role.rb +3 -4
  69. data/lib/gooddata/models/schedule.rb +0 -2
  70. data/lib/gooddata/models/user_filters/mandatory_user_filter.rb +9 -1
  71. data/lib/gooddata/models/user_filters/user_filter.rb +1 -2
  72. data/lib/gooddata/models/user_filters/user_filter_builder.rb +18 -6
  73. data/lib/gooddata/rest/client.rb +1 -2
  74. data/lib/gooddata/rest/connection.rb +12 -46
  75. data/lib/gooddata/rest/phmap.rb +101 -56
  76. data/lib/gooddata/version.rb +1 -1
  77. data/rubydev_public.gpg.encrypted +51 -0
  78. data/rubydev_secret_keys.gpg.encrypted +109 -0
  79. data/spec/data/user_filters.csv +2 -0
  80. data/spec/environment/default.rb +2 -2
  81. data/spec/environment/development.rb +1 -1
  82. data/spec/environment/staging.rb +2 -3
  83. data/spec/environment/testing.rb +4 -4
  84. data/spec/integration/connection_spec.rb +37 -0
  85. data/spec/integration/core/connection_spec.rb +1 -1
  86. data/spec/integration/core/logging_spec.rb +8 -6
  87. data/spec/integration/core/project_spec.rb +1 -1
  88. data/spec/integration/mandatory_user_filter_spec.rb +53 -0
  89. data/spec/integration/mixins/id_to_uri_spec.rb +17 -5
  90. data/spec/integration/models/label_spec.rb +9 -0
  91. data/spec/integration/models/metric_spec.rb +24 -0
  92. data/spec/integration/models/process_spec.rb +35 -0
  93. data/spec/integration/models/project_role_spec.rb +1 -1
  94. data/spec/integration/models/schedule_spec.rb +0 -8
  95. data/spec/integration/schedule_spec.rb +4 -6
  96. data/spec/integration/user_filters_spec.rb +20 -16
  97. data/spec/integration/user_group_spec.rb +1 -1
  98. data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/can_assign_a_custom_logger.yml +2287 -0
  99. data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/client_logs_when_given_custom_message.yml +2287 -0
  100. data/spec/integration/vcr_cassettes/GoodData_-_logging/_logger/has_the_request_id_logged_when_I_passed_it.yml +2287 -0
  101. data/spec/integration/vcr_cassettes/GoodData_-_logging/_logging_off/Disables_logging.yml +2287 -0
  102. data/spec/integration/vcr_cassettes/GoodData_-_logging/_logging_on/Enables_logging.yml +2287 -0
  103. data/spec/integration/vcr_cassettes/GoodData_-_project/_project/Returns_project_assigned.yml +354 -0
  104. data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_nil.yml +299 -0
  105. data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_directly.yml +354 -0
  106. data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_using_project_ID.yml +354 -0
  107. data/spec/integration/vcr_cassettes/GoodData_-_project/_project_/Assigns_project_using_project_URL.yml +354 -0
  108. data/spec/integration/vcr_cassettes/GoodData_-_project/_with_project/Uses_project_specified.yml +354 -0
  109. data/spec/integration/vcr_cassettes/GoodData_Metric/all.yml +2065 -0
  110. data/spec/integration/vcr_cassettes/GoodData_Metric/should_be_able_to_update_folders.yml +119 -0
  111. data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/all.yml +9812 -0
  112. data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_get_json_containing_correct_id.yml +174 -0
  113. data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_return_nil_for_unknown_id.yml +58 -0
  114. data/spec/integration/vcr_cassettes/GoodData_Mixin_MdIdToUri/should_throw_BadRequest_for_-1.yml +63 -0
  115. data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_connect/Connects_using_username_and_password.yml +299 -0
  116. data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_disconnect/Connects_using_username_and_password.yml +299 -0
  117. data/spec/integration/vcr_cassettes/GoodData_Rest_Connection/_generate_request_id/Generates_a_non-empty_string.yml +2287 -0
  118. data/spec/integration/vcr_cassettes/GoodData_UserGroup/_/Should_list_user_groups_as_Array.yml +56 -0
  119. data/spec/integration/vcr_cassettes/GoodData_UserGroup/_add_members/Should_add_member.yml +315 -0
  120. data/spec/integration/vcr_cassettes/GoodData_UserGroup/_members/Should_return_members_as_array.yml +54 -0
  121. data/spec/integration/vcr_cassettes/GoodData_UserGroup/_remove_members/Should_remove_existing_members.yml +258 -0
  122. data/spec/integration/vcr_cassettes/GoodData_UserGroup/_save/updates_existing_group.yml +159 -0
  123. data/spec/integration/vcr_cassettes/GoodData_UserGroup/_set_members/Should_set_new_members.yml +158 -0
  124. data/spec/integration/vcr_cassettes/GoodData_UserGroup/all.yml +809 -0
  125. data/spec/spec_helper.rb +46 -2
  126. data/spec/unit/actions/associate_clients_spec.rb +2 -1
  127. data/spec/unit/actions/collect_data_product_spec.rb +3 -1
  128. data/spec/unit/actions/collect_segment_clients_spec.rb +1 -0
  129. data/spec/unit/actions/create_segment_masters_spec.rb +1 -0
  130. data/spec/unit/actions/ensure_data_product_spec.rb +1 -0
  131. data/spec/unit/actions/ensure_technical_users_domain_spec.rb +2 -0
  132. data/spec/unit/actions/ensure_technical_users_project_spec.rb +4 -0
  133. data/spec/unit/actions/provision_clients_spec.rb +2 -1
  134. data/spec/unit/actions/synchronize_etls_in_segment_spec.rb +0 -6
  135. data/spec/unit/actions/synchronize_ldm_spec.rb +20 -7
  136. data/spec/unit/actions/synchronize_user_filters_spec.rb +21 -0
  137. data/spec/unit/helpers/check_helper_production_spec.rb +34 -0
  138. data/spec/unit/helpers/check_helper_spec.rb +97 -9
  139. data/spec/unit/lcm/lcm2_spec.rb +67 -3
  140. data/spec/unit/models/blueprint/to_wire_spec.rb +1 -0
  141. data/spec/unit/models/dataset_blueprint.rb +14 -0
  142. data/spec/unit/models/from_wire_spec.rb +20 -0
  143. data/spec/unit/models/model_spec.rb +10 -0
  144. data/spec/unit/models/to_manifest_spec.rb +29 -0
  145. data/spec/unit/models/user_filters/user_filter_builder_spec.rb +44 -6
  146. data/spec/unit/rest/phmap_spec.rb +117 -0
  147. data/spec/vcr_configurer.rb +63 -0
  148. metadata +283 -24
  149. data/lib/gooddata/lcm/actions/ensure_segments.rb +0 -32
@@ -12,14 +12,15 @@ module GoodData
12
12
  DESCRIPTION = 'Collect Segments from API'
13
13
 
14
14
  PARAMS = define_params(self) do
15
- description 'Client Used for Connecting to GD'
16
- param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
-
18
- description 'Organization Name'
19
- param :organization, instance_of(Type::StringType), required: true
20
15
 
21
16
  description 'Segments to provision'
22
17
  param :segments_filter, array_of(instance_of(Type::StringType)), required: false
18
+
19
+ description 'DataProduct'
20
+ param :data_product, instance_of(Type::GDDataProductType), required: false
21
+
22
+ description 'Logger'
23
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
23
24
  end
24
25
 
25
26
  class << self
@@ -13,7 +13,7 @@ module GoodData
13
13
  DESCRIPTION = 'Collect all objects tagged with the +$PRODUCTION_TAG+ from development projects'
14
14
 
15
15
  PARAMS = define_params(self) do
16
- description 'Development Client Used for Connecting to GD'
16
+ description 'Client used to connecting to development domain'
17
17
  param :development_client, instance_of(Type::GdClientType), required: true
18
18
 
19
19
  description 'Synchronization Info'
@@ -15,6 +15,9 @@ module GoodData
15
15
  description 'Input source of the Users Brick. Needed to prevent ' \
16
16
  'deletion of filters for a user that is to be removed.'
17
17
  param :users_brick_config, instance_of(Type::UsersBrickConfig), required: true
18
+
19
+ description 'Input Source'
20
+ param :input_source, instance_of(Type::HashType), required: false
18
21
  end
19
22
 
20
23
  class << self
@@ -22,10 +25,13 @@ module GoodData
22
25
  users_brick_users = []
23
26
  login_column = params.users_brick_config.login_column || 'login'
24
27
  users_brick_data_source = GoodData::Helpers::DataSource.new(params.users_brick_config.input_source)
25
- users_brick_data_source_file = File.open(
26
- users_brick_data_source.realize(params),
27
- 'r:UTF-8'
28
- )
28
+
29
+ users_brick_data_source_file = without_check(PARAMS, params) do
30
+ File.open(
31
+ users_brick_data_source.realize(params),
32
+ 'r:UTF-8'
33
+ )
34
+ end
29
35
  CSV.foreach(users_brick_data_source_file,
30
36
  headers: true,
31
37
  return_headers: false,
@@ -15,11 +15,14 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
- description 'Development Client Used for Connecting to GD'
18
+ description 'Client used to connecting to development domain'
19
19
  param :development_client, instance_of(Type::GdClientType), required: true
20
20
 
21
21
  description 'Organization Name'
22
- param :organization, instance_of(Type::StringType), required: true
22
+ param :organization, instance_of(Type::StringType), required: false
23
+
24
+ description 'Domain'
25
+ param :domain, instance_of(Type::StringType), required: false
23
26
 
24
27
  description 'ADS Client'
25
28
  param :ads_client, instance_of(Type::AdsClientType), required: true
@@ -35,6 +38,12 @@ module GoodData
35
38
 
36
39
  description 'Project Environment'
37
40
  param :project_environment, instance_of(Type::StringType), required: false
41
+
42
+ description 'DataProduct to manage'
43
+ param :data_product, instance_of(Type::GDDataProductType), required: false
44
+
45
+ description 'Logger'
46
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
38
47
  end
39
48
 
40
49
  DEFAULT_TABLE_NAME = 'LCM_RELEASE'
@@ -47,6 +56,7 @@ module GoodData
47
56
  development_client = params.development_client
48
57
 
49
58
  domain_name = params.organization || params.domain
59
+ fail "Either organisation or domain has to be specified in params" unless domain_name
50
60
  domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
51
61
  data_product = params.data_product
52
62
  domain_segments = domain.segments(:all, data_product)
@@ -17,6 +17,15 @@ module GoodData
17
17
 
18
18
  description 'DataProduct to ensure'
19
19
  param :data_product, instance_of(Type::StringType), required: false
20
+
21
+ description 'Organization Name'
22
+ param :organization, instance_of(Type::StringType), required: false
23
+
24
+ description 'Domain'
25
+ param :domain, instance_of(Type::StringType), required: false
26
+
27
+ description 'Logger'
28
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
20
29
  end
21
30
 
22
31
  RESULT_HEADER = [
@@ -28,6 +37,7 @@ module GoodData
28
37
  params = params.to_hash
29
38
  client = params.gdc_gd_client
30
39
  domain_name = params.organization || params.domain
40
+ fail "Either organisation or domain has to be specified in params" unless domain_name
31
41
  domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
32
42
 
33
43
  if params.key?(:data_product)
@@ -16,7 +16,10 @@ module GoodData
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
18
  description 'Organization Name'
19
- param :organization, instance_of(Type::StringType), required: true
19
+ param :organization, instance_of(Type::StringType), required: false
20
+
21
+ description 'Domain'
22
+ param :domain, instance_of(Type::StringType), required: false
20
23
 
21
24
  description 'Technical users'
22
25
  param :technical_user, array_of(instance_of(Type::StringType)),
@@ -38,6 +41,7 @@ module GoodData
38
41
  client = params.gdc_gd_client
39
42
 
40
43
  domain_name = params.organization || params.domain
44
+ fail "Either organisation or domain has to be specified in params" unless domain_name
41
45
  domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
42
46
 
43
47
  technical_users = (params.technical_users || params.technical_user || []).uniq
@@ -24,6 +24,9 @@ module GoodData
24
24
 
25
25
  description 'Synchronization Info'
26
26
  param :synchronize, array_of(instance_of(Type::SynchronizationInfoType)), required: true, generated: true
27
+
28
+ description 'Clients'
29
+ param :clients, array_of(instance_of(Type::HashType)), required: false
27
30
  end
28
31
 
29
32
  RESULT_HEADER = [
@@ -41,6 +41,15 @@ module GoodData
41
41
 
42
42
  description 'Number Of Threads'
43
43
  param :number_of_threads, instance_of(Type::StringType), required: false, default: '5'
44
+
45
+ description 'Logger'
46
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
47
+
48
+ description 'GDC Project'
49
+ param :gdc_project, instance_of(Type::GdProjectType), required: false
50
+
51
+ description 'GDC Project Id'
52
+ param :gdc_project_id, instance_of(Type::StringType), required: false
44
53
  end
45
54
 
46
55
  class << self
@@ -49,6 +58,7 @@ module GoodData
49
58
 
50
59
  client = params.gdc_gd_client
51
60
  project = client.projects(params.gdc_project) || client.projects(params.gdc_project_id)
61
+ fail "Either project or project_id has to be specified in params" unless project
52
62
 
53
63
  list_of_modes = params.list_of_modes.split('|').map(&:strip)
54
64
  work_done_identificator = params.work_done_identificator
@@ -15,7 +15,7 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
- description 'Development Client Used for Connecting to GD'
18
+ description 'Client used to connecting to development domain'
19
19
  param :development_client, instance_of(Type::GdClientType), required: true
20
20
 
21
21
  description 'Synchronization Info'
@@ -17,10 +17,19 @@ module GoodData
17
17
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
18
18
 
19
19
  description 'Organization Name'
20
- param :organization, instance_of(Type::StringType), required: true
20
+ param :organization, instance_of(Type::StringType), required: false
21
+
22
+ description 'Domain'
23
+ param :domain, instance_of(Type::StringType), required: false
21
24
 
22
25
  description 'Segments to manage'
23
26
  param :segments, array_of(instance_of(Type::SegmentType)), required: true
27
+
28
+ description 'DataProduct to manage'
29
+ param :data_product, instance_of(Type::GDDataProductType), required: false
30
+
31
+ description 'Logger'
32
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
24
33
  end
25
34
 
26
35
  RESULT_HEADER = [
@@ -37,6 +46,7 @@ module GoodData
37
46
  data_product = params.data_product
38
47
  client = params.gdc_gd_client
39
48
  domain_name = params.organization || params.domain
49
+ fail "Either organisation or domain has to be specified in params" unless domain_name
40
50
  domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
41
51
 
42
52
  begin
@@ -66,7 +76,7 @@ module GoodData
66
76
  end
67
77
  rescue => e
68
78
  params.gdc_logger.error "Problem occurs when provisioning clients. Purge all invalid clients now ..."
69
- res = PurgeClients.send(:call, params)
79
+ res = LCM2.run_action PurgeClients, params
70
80
  params.gdc_logger.debug "Purge clients result: #{res}"
71
81
  deleted_client_ids = res[:results].select { |r| r[:status] == 'purged' }.map { |r| r[:client_id] }
72
82
  params.gdc_logger.error "Deleted clients: #{deleted_client_ids.join(', ')}"
@@ -12,6 +12,8 @@ module GoodData
12
12
  DESCRIPTION = 'Purge LCM Clients'
13
13
 
14
14
  PARAMS = define_params(self) do
15
+ description 'Client projects'
16
+ param :client_projects, instance_of(Type::GdSmartHashType), required: false
15
17
  end
16
18
 
17
19
  RESULT_HEADER = [
@@ -14,6 +14,9 @@ module GoodData
14
14
  PARAMS = define_params(self) do
15
15
  description 'Clients'
16
16
  param :clients, array_of(instance_of(Type::HashType)), required: true, generated: true
17
+
18
+ description 'Client projects'
19
+ param :client_projects, instance_of(Type::GdSmartHashType), required: false
17
20
  end
18
21
 
19
22
  RESULT_HEADER = [
@@ -15,11 +15,14 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
- description 'Development Client Used for Connecting to GD'
18
+ description 'Client used to connecting to development domain'
19
19
  param :development_client, instance_of(Type::GdClientType), required: true
20
20
 
21
21
  description 'Synchronization Info'
22
22
  param :synchronize, array_of(instance_of(Type::SynchronizationInfoType)), required: true, generated: true
23
+
24
+ description 'Additional Hidden Parameters'
25
+ param :additional_hidden_params, instance_of(Type::HashType), required: false
23
26
  end
24
27
 
25
28
  RESULT_HEADER = [
@@ -20,6 +20,12 @@ module GoodData
20
20
 
21
21
  description 'Specifies whether to transfer computed attributes'
22
22
  param :include_computed_attributes, instance_of(Type::BooleanType), required: false, default: true
23
+
24
+ description 'Logger'
25
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
26
+
27
+ description 'Additional Hidden Parameters'
28
+ param :additional_hidden_params, instance_of(Type::HashType), required: false
23
29
  end
24
30
 
25
31
  class << self
@@ -46,7 +52,7 @@ module GoodData
46
52
  next unless ca_scripts
47
53
 
48
54
  pid = entry[:pid]
49
- ca_chunks = ca_scripts['maqlDdlChunks']
55
+ ca_chunks = ca_scripts[:maqlDdlChunks]
50
56
  to_project = client.projects(pid) || fail("Invalid 'to' project specified - '#{pid}'")
51
57
  params.gdc_logger.info "Synchronizing Computed Attributes to project: '#{to_project.title}', PID: #{pid}"
52
58
 
@@ -15,8 +15,14 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
+ description 'DataProduct to manage'
19
+ param :data_product, instance_of(Type::GDDataProductType), required: false
20
+
18
21
  description 'Organization Name'
19
- param :organization, instance_of(Type::StringType), required: true
22
+ param :organization, instance_of(Type::StringType), required: false
23
+
24
+ description 'Domain'
25
+ param :domain, instance_of(Type::StringType), required: false
20
26
 
21
27
  description 'Segments to manage'
22
28
  param :segments, array_of(instance_of(Type::SegmentType)), required: true
@@ -26,6 +32,9 @@ module GoodData
26
32
 
27
33
  description 'ADS Client'
28
34
  param :ads_client, instance_of(Type::AdsClientType), required: true
35
+
36
+ description 'Additional Hidden Parameters'
37
+ param :additional_hidden_params, instance_of(Type::HashType), required: false
29
38
  end
30
39
 
31
40
  RESULT_HEADER = [
@@ -42,6 +51,7 @@ module GoodData
42
51
  client = params.gdc_gd_client
43
52
 
44
53
  domain_name = params.organization || params.domain
54
+ fail "Either organisation or domain has to be specified in params" unless domain_name
45
55
  domain = client.domain(domain_name) || fail("Invalid domain name specified - #{domain_name}")
46
56
  data_product = params.data_product
47
57
  domain_segments = domain.segments(:all, data_product)
@@ -15,11 +15,17 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
- description 'Development Client Used for Connecting to GD'
18
+ description 'Client used to connecting to development domain'
19
19
  param :development_client, instance_of(Type::GdClientType), required: true
20
20
 
21
21
  description 'Synchronization Info'
22
22
  param :synchronize, array_of(instance_of(Type::SynchronizationInfoType)), required: true, generated: true
23
+
24
+ description 'Logger'
25
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
26
+
27
+ description 'Additional Hidden Parameters'
28
+ param :additional_hidden_params, instance_of(Type::HashType), required: false
23
29
  end
24
30
 
25
31
  RESULT_HEADER = [
@@ -15,9 +15,6 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
- description 'Organization Name'
19
- param :organization, instance_of(Type::StringType), required: true
20
-
21
18
  description 'Synchronization Info'
22
19
  param :synchronize, array_of(instance_of(Type::SynchronizationInfoType)), required: true, generated: true
23
20
 
@@ -26,6 +23,18 @@ module GoodData
26
23
 
27
24
  description 'Schedule Additional Secure Parameters'
28
25
  param :additional_hidden_params, instance_of(Type::HashType), required: false
26
+
27
+ description 'Schedule Parameters'
28
+ param :schedule_params, instance_of(Type::HashType), required: false, default: {}
29
+
30
+ description 'DataProduct to manage'
31
+ param :data_product, instance_of(Type::GDDataProductType), required: false
32
+
33
+ description 'Logger'
34
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
35
+
36
+ description 'Delete extra process schedule flag'
37
+ param :delete_extra_process_schedule, instance_of(Type::BooleanType), required: false, default: true
29
38
  end
30
39
 
31
40
  # will be updated later based on the way etl synchronization
@@ -117,10 +126,6 @@ module GoodData
117
126
  end
118
127
 
119
128
  schedule.update_params(params.additional_params) if params.additional_params
120
- schedule.update_params(
121
- CLIENT_ID: client_id, # needed for ADD and CloudConnect ETL
122
- GOODOT_CUSTOM_PROJECT_ID: client_id # TMA-210
123
- )
124
129
 
125
130
  schedule.update_params(params_for_all_schedules_in_all_projects) if params_for_all_schedules_in_all_projects
126
131
  schedule.update_params(params_for_all_projects[schedule.name]) if params_for_all_projects[schedule.name]
@@ -15,11 +15,14 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
- description 'Development Client Used for Connecting to GD'
18
+ description 'Client used to connecting to development domain'
19
19
  param :development_client, instance_of(Type::GdClientType), required: true
20
20
 
21
21
  description 'Synchronization Info'
22
22
  param :synchronize, array_of(instance_of(Type::SynchronizationInfoType)), required: true, generated: true
23
+
24
+ description 'Additional Hidden Parameters'
25
+ param :additional_hidden_params, instance_of(Type::HashType), required: false
23
26
  end
24
27
 
25
28
  RESULT_HEADER = [
@@ -15,7 +15,7 @@ module GoodData
15
15
  description 'Client Used for Connecting to GD'
16
16
  param :gdc_gd_client, instance_of(Type::GdClientType), required: true
17
17
 
18
- description 'Development Client Used for Connecting to GD'
18
+ description 'Client used to connecting to development domain'
19
19
  param :development_client, instance_of(Type::GdClientType), required: true
20
20
 
21
21
  description 'Synchronization Info'
@@ -26,15 +26,21 @@ module GoodData
26
26
 
27
27
  description 'Specifies whether to transfer computed attributes'
28
28
  param :include_computed_attributes, instance_of(Type::BooleanType), required: false, default: true
29
+
30
+ description 'Logger'
31
+ param :gdc_logger, instance_of(Type::GdLogger), required: true
32
+
33
+ description 'Additional Hidden Parameters'
34
+ param :additional_hidden_params, instance_of(Type::HashType), required: false
35
+
36
+ description 'Allows to have facts with higher precision decimals'
37
+ param :exclude_fact_rule, instance_of(Type::BooleanType), required: false, default: false
29
38
  end
30
39
 
31
40
  class << self
32
41
  def call(params)
33
- # set default value for include_computed_attributes
34
- # (we won't have to do this after TMA-690)
35
- include_ca = params.include_computed_attributes
36
- include_ca = true if include_ca.nil?
37
- include_ca = include_ca.to_b
42
+ include_ca = params.include_computed_attributes.to_b
43
+ exclude_fact_rule = params.exclude_fact_rule.to_b
38
44
 
39
45
  results = []
40
46
 
@@ -54,7 +60,12 @@ module GoodData
54
60
  to_project = client.projects(pid) || fail("Invalid 'to' project specified - '#{pid}'")
55
61
 
56
62
  params.gdc_logger.info "Updating from Blueprint, project: '#{to_project.title}', PID: #{pid}"
57
- ca_scripts = to_project.update_from_blueprint(blueprint, update_preference: params.update_preference, execute_ca_scripts: false)
63
+ ca_scripts = to_project.update_from_blueprint(
64
+ blueprint,
65
+ update_preference: params.update_preference,
66
+ execute_ca_scripts: false,
67
+ exclude_fact_rule: exclude_fact_rule
68
+ )
58
69
 
59
70
  entry[:ca_scripts] = ca_scripts
60
71