droplet_kit 3.15.0 → 3.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -10
  3. data/lib/droplet_kit/client.rb +4 -0
  4. data/lib/droplet_kit/error_handling_resourcable.rb +2 -0
  5. data/lib/droplet_kit/mappings/account_mapping.rb +2 -0
  6. data/lib/droplet_kit/mappings/action_mapping.rb +2 -0
  7. data/lib/droplet_kit/mappings/balance_mapping.rb +2 -0
  8. data/lib/droplet_kit/mappings/cdn_mapping.rb +2 -0
  9. data/lib/droplet_kit/mappings/certificate_mapping.rb +2 -0
  10. data/lib/droplet_kit/mappings/container_registry_mapping.rb +2 -0
  11. data/lib/droplet_kit/mappings/container_registry_repository_mapping.rb +2 -0
  12. data/lib/droplet_kit/mappings/container_registry_repository_tag_mapping.rb +2 -0
  13. data/lib/droplet_kit/mappings/database_backup_mapping.rb +2 -0
  14. data/lib/droplet_kit/mappings/database_backup_restore_mapping.rb +2 -0
  15. data/lib/droplet_kit/mappings/database_cluster_mapping.rb +2 -0
  16. data/lib/droplet_kit/mappings/database_connection_mapping.rb +2 -0
  17. data/lib/droplet_kit/mappings/database_connection_pool_mapping.rb +2 -0
  18. data/lib/droplet_kit/mappings/database_eviction_policy_mapping.rb +2 -0
  19. data/lib/droplet_kit/mappings/database_firewall_rule_mapping.rb +2 -0
  20. data/lib/droplet_kit/mappings/database_maintenance_window_mapping.rb +2 -0
  21. data/lib/droplet_kit/mappings/database_mapping.rb +2 -0
  22. data/lib/droplet_kit/mappings/database_replica_mapping.rb +2 -0
  23. data/lib/droplet_kit/mappings/database_sql_mode_mapping.rb +2 -0
  24. data/lib/droplet_kit/mappings/database_user_mapping.rb +2 -0
  25. data/lib/droplet_kit/mappings/database_user_reset_auth_mapping.rb +2 -0
  26. data/lib/droplet_kit/mappings/domain_mapping.rb +2 -0
  27. data/lib/droplet_kit/mappings/domain_record_mapping.rb +2 -0
  28. data/lib/droplet_kit/mappings/droplet_mapping.rb +2 -0
  29. data/lib/droplet_kit/mappings/droplet_upgrade_mapping.rb +2 -0
  30. data/lib/droplet_kit/mappings/error_mapping.rb +2 -0
  31. data/lib/droplet_kit/mappings/firewall_inbound_rule_mapping.rb +2 -0
  32. data/lib/droplet_kit/mappings/firewall_mapping.rb +2 -0
  33. data/lib/droplet_kit/mappings/firewall_outbound_rule_mapping.rb +2 -0
  34. data/lib/droplet_kit/mappings/firewall_pending_change_mapping.rb +2 -0
  35. data/lib/droplet_kit/mappings/firewall_rule_mapping.rb +2 -0
  36. data/lib/droplet_kit/mappings/floating_ip_mapping.rb +2 -0
  37. data/lib/droplet_kit/mappings/forwarding_rule_mapping.rb +2 -0
  38. data/lib/droplet_kit/mappings/health_check_mapping.rb +2 -0
  39. data/lib/droplet_kit/mappings/image_mapping.rb +2 -0
  40. data/lib/droplet_kit/mappings/invoice_mapping.rb +2 -0
  41. data/lib/droplet_kit/mappings/kernel_mapping.rb +2 -0
  42. data/lib/droplet_kit/mappings/kubernetes_cluster_mapping.rb +2 -0
  43. data/lib/droplet_kit/mappings/kubernetes_maintenance_policy_mapping.rb +2 -0
  44. data/lib/droplet_kit/mappings/kubernetes_node_mapping.rb +2 -0
  45. data/lib/droplet_kit/mappings/kubernetes_node_pool_mapping.rb +2 -0
  46. data/lib/droplet_kit/mappings/kubernetes_options_mapping.rb +2 -0
  47. data/lib/droplet_kit/mappings/links_mapping.rb +2 -0
  48. data/lib/droplet_kit/mappings/load_balancer_mapping.rb +5 -0
  49. data/lib/droplet_kit/mappings/network_detail_mapping.rb +2 -0
  50. data/lib/droplet_kit/mappings/network_mapping.rb +2 -0
  51. data/lib/droplet_kit/mappings/project_assignment_mapping.rb +2 -0
  52. data/lib/droplet_kit/mappings/project_mapping.rb +2 -0
  53. data/lib/droplet_kit/mappings/region_mapping.rb +2 -0
  54. data/lib/droplet_kit/mappings/reserved_ip_mapping.rb +21 -0
  55. data/lib/droplet_kit/mappings/size_mapping.rb +2 -0
  56. data/lib/droplet_kit/mappings/snapshot_mapping.rb +2 -0
  57. data/lib/droplet_kit/mappings/ssh_key_mapping.rb +2 -0
  58. data/lib/droplet_kit/mappings/sticky_session_mapping.rb +2 -0
  59. data/lib/droplet_kit/mappings/tag_mapping.rb +2 -0
  60. data/lib/droplet_kit/mappings/tagged_droplets_resources_mapping.rb +2 -0
  61. data/lib/droplet_kit/mappings/tagged_images_resources_mapping.rb +2 -0
  62. data/lib/droplet_kit/mappings/tagged_resources_mapping.rb +2 -0
  63. data/lib/droplet_kit/mappings/volume_mapping.rb +2 -0
  64. data/lib/droplet_kit/mappings/vpc_mapping.rb +2 -0
  65. data/lib/droplet_kit/mappings/vpc_member_mapping.rb +2 -0
  66. data/lib/droplet_kit/models/account.rb +2 -0
  67. data/lib/droplet_kit/models/action.rb +2 -0
  68. data/lib/droplet_kit/models/balance.rb +2 -0
  69. data/lib/droplet_kit/models/base_model.rb +2 -0
  70. data/lib/droplet_kit/models/cdn.rb +2 -0
  71. data/lib/droplet_kit/models/certificate.rb +2 -0
  72. data/lib/droplet_kit/models/container_registry.rb +2 -0
  73. data/lib/droplet_kit/models/container_registry_repository.rb +2 -0
  74. data/lib/droplet_kit/models/container_registry_repository_tag.rb +2 -0
  75. data/lib/droplet_kit/models/database.rb +2 -0
  76. data/lib/droplet_kit/models/database_backup.rb +2 -0
  77. data/lib/droplet_kit/models/database_cluster.rb +2 -0
  78. data/lib/droplet_kit/models/database_connection.rb +2 -0
  79. data/lib/droplet_kit/models/database_connection_pool.rb +2 -0
  80. data/lib/droplet_kit/models/database_eviction_policy.rb +2 -0
  81. data/lib/droplet_kit/models/database_firewall_rule.rb +2 -0
  82. data/lib/droplet_kit/models/database_maintenance_window.rb +2 -0
  83. data/lib/droplet_kit/models/database_replica.rb +2 -0
  84. data/lib/droplet_kit/models/database_sql_mode.rb +2 -0
  85. data/lib/droplet_kit/models/database_user.rb +2 -0
  86. data/lib/droplet_kit/models/database_user_mysql_settings.rb +2 -0
  87. data/lib/droplet_kit/models/database_user_reset_auth.rb +2 -0
  88. data/lib/droplet_kit/models/domain.rb +2 -0
  89. data/lib/droplet_kit/models/domain_record.rb +2 -0
  90. data/lib/droplet_kit/models/droplet.rb +2 -0
  91. data/lib/droplet_kit/models/droplet_upgrade.rb +2 -0
  92. data/lib/droplet_kit/models/firewall.rb +2 -0
  93. data/lib/droplet_kit/models/firewall_inbound_rule.rb +2 -0
  94. data/lib/droplet_kit/models/firewall_outbound_rule.rb +2 -0
  95. data/lib/droplet_kit/models/firewall_pending_change.rb +2 -0
  96. data/lib/droplet_kit/models/firewall_rule.rb +2 -0
  97. data/lib/droplet_kit/models/floating_ip.rb +2 -0
  98. data/lib/droplet_kit/models/forwarding_rule.rb +2 -0
  99. data/lib/droplet_kit/models/health_check.rb +2 -0
  100. data/lib/droplet_kit/models/image.rb +2 -0
  101. data/lib/droplet_kit/models/invoice.rb +2 -0
  102. data/lib/droplet_kit/models/kernel.rb +2 -0
  103. data/lib/droplet_kit/models/kubernetes_cluster.rb +2 -0
  104. data/lib/droplet_kit/models/kubernetes_maintenance_policy.rb +2 -0
  105. data/lib/droplet_kit/models/kubernetes_node.rb +2 -0
  106. data/lib/droplet_kit/models/kubernetes_node_pool.rb +2 -0
  107. data/lib/droplet_kit/models/kubernetes_options.rb +2 -0
  108. data/lib/droplet_kit/models/links.rb +2 -0
  109. data/lib/droplet_kit/models/load_balancer.rb +4 -0
  110. data/lib/droplet_kit/models/meta_information.rb +2 -0
  111. data/lib/droplet_kit/models/network.rb +2 -0
  112. data/lib/droplet_kit/models/network_hash.rb +2 -0
  113. data/lib/droplet_kit/models/pagination_information.rb +2 -0
  114. data/lib/droplet_kit/models/project.rb +2 -0
  115. data/lib/droplet_kit/models/project_assignment.rb +2 -0
  116. data/lib/droplet_kit/models/region.rb +2 -0
  117. data/lib/droplet_kit/models/reserved_ip.rb +20 -0
  118. data/lib/droplet_kit/models/size.rb +2 -0
  119. data/lib/droplet_kit/models/snapshot.rb +2 -0
  120. data/lib/droplet_kit/models/ssh_key.rb +2 -0
  121. data/lib/droplet_kit/models/sticky_session.rb +2 -0
  122. data/lib/droplet_kit/models/tag.rb +2 -0
  123. data/lib/droplet_kit/models/tagged_droplets_resources.rb +2 -0
  124. data/lib/droplet_kit/models/tagged_images_resources.rb +2 -0
  125. data/lib/droplet_kit/models/tagged_resources.rb +2 -0
  126. data/lib/droplet_kit/models/volume.rb +2 -0
  127. data/lib/droplet_kit/models/vpc.rb +2 -0
  128. data/lib/droplet_kit/models/vpc_member.rb +2 -0
  129. data/lib/droplet_kit/paginated_resource.rb +2 -0
  130. data/lib/droplet_kit/resources/account_resource.rb +3 -1
  131. data/lib/droplet_kit/resources/action_resource.rb +3 -1
  132. data/lib/droplet_kit/resources/balance_resource.rb +3 -1
  133. data/lib/droplet_kit/resources/cdn_resource.rb +2 -0
  134. data/lib/droplet_kit/resources/certificate_resource.rb +2 -0
  135. data/lib/droplet_kit/resources/container_registry_repository_resource.rb +26 -25
  136. data/lib/droplet_kit/resources/container_registry_resource.rb +22 -21
  137. data/lib/droplet_kit/resources/database_resource.rb +2 -0
  138. data/lib/droplet_kit/resources/domain_record_resource.rb +2 -0
  139. data/lib/droplet_kit/resources/domain_resource.rb +2 -0
  140. data/lib/droplet_kit/resources/droplet_action_resource.rb +2 -0
  141. data/lib/droplet_kit/resources/droplet_resource.rb +2 -0
  142. data/lib/droplet_kit/resources/droplet_upgrade_resource.rb +3 -1
  143. data/lib/droplet_kit/resources/firewall_resource.rb +2 -0
  144. data/lib/droplet_kit/resources/floating_ip_action_resource.rb +3 -1
  145. data/lib/droplet_kit/resources/floating_ip_resource.rb +3 -1
  146. data/lib/droplet_kit/resources/image_action_resource.rb +2 -0
  147. data/lib/droplet_kit/resources/image_resource.rb +3 -1
  148. data/lib/droplet_kit/resources/invoice_resource.rb +13 -11
  149. data/lib/droplet_kit/resources/kubernetes_cluster_resource.rb +2 -0
  150. data/lib/droplet_kit/resources/kubernetes_options_resource.rb +2 -0
  151. data/lib/droplet_kit/resources/load_balancer_resource.rb +2 -0
  152. data/lib/droplet_kit/resources/project_resource.rb +2 -0
  153. data/lib/droplet_kit/resources/region_resource.rb +2 -0
  154. data/lib/droplet_kit/resources/reserved_ip_action_resource.rb +32 -0
  155. data/lib/droplet_kit/resources/reserved_ip_resource.rb +31 -0
  156. data/lib/droplet_kit/resources/size_resource.rb +2 -0
  157. data/lib/droplet_kit/resources/snapshot_resource.rb +3 -1
  158. data/lib/droplet_kit/resources/ssh_key_resource.rb +2 -0
  159. data/lib/droplet_kit/resources/tag_resource.rb +2 -0
  160. data/lib/droplet_kit/resources/volume_action_resource.rb +3 -1
  161. data/lib/droplet_kit/resources/volume_resource.rb +2 -0
  162. data/lib/droplet_kit/resources/vpc_resource.rb +2 -0
  163. data/lib/droplet_kit/utils.rb +2 -0
  164. data/lib/droplet_kit/version.rb +3 -1
  165. data/lib/droplet_kit.rb +6 -0
  166. data/lib/tasks/resource_doc.rake +2 -0
  167. metadata +17 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7e1697abc6f7381a7ecc9d1c19c4e5cccd5844201759fe4624f87fed81164d3
4
- data.tar.gz: 3768790a72256c983b85dd06c2031451899a3adb02b40c29a36a68942224be44
3
+ metadata.gz: 41268723b3dc385b7044425695730bfdd7f11852f790a3a0ef67d40b63dc5057
4
+ data.tar.gz: d96fbf6b39c6d3536afdb3a3dd458cfa4bf5ffbdc758d023427d04eff85eef94
5
5
  SHA512:
6
- metadata.gz: 260ab8b6c9383854f8746b4247e7cc341f35ca8cd83ebec0ebda0c10fd64e9584aade02b0332c5efe6a24e70c3ffed7c8a27740f8680959a460e2af2031c83e0
7
- data.tar.gz: 41667e255308d920906ecc83e92afcfb3273959dba81ddd73d1d2d631362f30946228bf530cc2330160a942b284ebf5a126cf00c195146b47f28adda52fdb8c9
6
+ metadata.gz: 6aa5da7401020dda27fafb3d7fa3844d089ade8c3e5b029cfe656fb1b802a798cc91f96cfe37c0204a73f26182952b8f004ef254cb599087ad6d3c590b4b1c2a
7
+ data.tar.gz: bead9ef065aae464fd0d8c7f0b421c5e58d57af2026054d39ceaf2cef5286146bd4d2ba8ea6c9ce33a3e2a6391c4492edcef9270808ca3ba7e8b7808b2b1c3f3
data/README.md CHANGED
@@ -525,27 +525,27 @@ Actions supported:
525
525
 
526
526
  * `client.balance.info()`
527
527
 
528
- ## Floating IP resource
528
+ ## Reserved IP resource
529
529
 
530
530
  client = DropletKit::Client.new(access_token: 'TOKEN')
531
- client.floating_ips #=> DropletKit::FloatingIpResource
531
+ client.reserved_ips #=> DropletKit::ReservedIpResource
532
532
 
533
533
  Actions supported:
534
534
 
535
- * `client.floating_ips.all()`
536
- * `client.floating_ips.find(ip: 'ip address')`
537
- * `client.floating_ips.create(floating_ip)`
538
- * `client.floating_ips.delete(ip: 'ip address')`
535
+ * `client.reserved_ips.all()`
536
+ * `client.reserved_ips.find(ip: 'ip address')`
537
+ * `client.reserved_ips.create(reserved_ip)`
538
+ * `client.reserved_ips.delete(ip: 'ip address')`
539
539
 
540
- ## Floating IP Action resource
540
+ ## Reserved IP Action resource
541
541
 
542
542
  client = DropletKit::Client.new(access_token: 'TOKEN')
543
- client.floating_ip_actions #=> DropletKit::FloatingIpActionResource
543
+ client.reserved_ip_actions #=> DropletKit::ReservedIpActionResource
544
544
 
545
545
  Actions supported:
546
546
 
547
- * `client.floating_ip_actions.assign(ip: floating_ip.ip, droplet_id: droplet.id)`
548
- * `client.floating_ip_actions.unassign(ip: floating_ip.ip)`
547
+ * `client.reserved_ip_actions.assign(ip: reserved_ip.ip, droplet_id: droplet.id)`
548
+ * `client.reserved_ip_actions.unassign(ip: reserved_ip.ip)`
549
549
 
550
550
  ## Volume resource
551
551
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'faraday'
2
4
  require 'droplet_kit/utils'
3
5
 
@@ -53,6 +55,8 @@ module DropletKit
53
55
  balance: BalanceResource,
54
56
  floating_ips: FloatingIpResource,
55
57
  floating_ip_actions: FloatingIpActionResource,
58
+ reserved_ips: ReservedIpResource,
59
+ reserved_ip_actions: ReservedIpActionResource,
56
60
  tags: TagResource,
57
61
  projects: ProjectResource,
58
62
  volumes: VolumeResource,
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ErrorHandlingResourcable
2
4
  def self.included(base)
3
5
  base.send(:resources) do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class AccountMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ActionMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class BalanceMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class CDNMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class CertificateMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ContainerRegistryMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ContainerRegistryRepositoryMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ContainerRegistryRepositoryTagMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseBackupMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseBackupRestoreMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseClusterMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseConnectionMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseConnectionPoolMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseEvictionPolicyMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseFirewallRuleMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseMaintenanceWindowMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseReplicaMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseSQLModeMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseUserMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseUserResetAuthMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DomainMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DomainRecordMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DropletMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DropletUpgradeMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ErrorMapping
3
5
  Error = Struct.new(:message, :id)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class FirewallInboundRuleMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class FirewallMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class FirewallOutboundRuleMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class FirewallPendingChangeMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class FirewallRuleMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class FloatingIpMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ForwardingRuleMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class HealthCheckMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ImageMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class InvoiceMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class KernelMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class KubernetesClusterMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class KubernetesMaintenancePolicyMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class KubernetesNodeMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class KubernetesNodePoolMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class KubernetesOptionsMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class LinksMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class LoadBalancerMapping
3
5
  include Kartograph::DSL
@@ -13,6 +15,7 @@ module DropletKit
13
15
  property :created_at
14
16
  property :region, include: RegionMapping
15
17
  property :size
18
+ property :size_unit
16
19
  property :vpc_uuid
17
20
  end
18
21
 
@@ -27,11 +30,13 @@ module DropletKit
27
30
  property :sticky_sessions, include: StickySessionMapping
28
31
  property :health_check, include: HealthCheckMapping
29
32
  property :forwarding_rules, plural: true, include: ForwardingRuleMapping
33
+ property :disable_lets_encrypt_dns_records
30
34
  end
31
35
 
32
36
  scoped :update, :create do
33
37
  property :region
34
38
  property :size
39
+ property :size_unit
35
40
  end
36
41
 
37
42
  scoped :create do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class NetworkDetailMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class NetworkMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ProjectAssignmentMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ProjectMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class RegionMapping
3
5
  include Kartograph::DSL
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DropletKit
4
+ class ReservedIpMapping
5
+ include Kartograph::DSL
6
+
7
+ kartograph do
8
+ mapping ReservedIp
9
+ root_key plural: 'reserved_ips', singular: 'reserved_ip', scopes: [:read]
10
+
11
+ property :ip, scopes: [:read]
12
+
13
+ property :region, scopes: [:read], include: RegionMapping
14
+ property :droplet, scopes: [:read], include: DropletMapping
15
+
16
+ # Create properties aren't quite the same
17
+ property :droplet_id, scopes: [:create]
18
+ property :region, scopes: [:create]
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class SizeMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class SnapshotMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class SSHKeyMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class StickySessionMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class TagMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class TaggedDropletsResourcesMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class TaggedImagesResourcesMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class TaggedResourcesMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class VolumeMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class VPCMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class VPCMemberMapping
3
5
  include Kartograph::DSL
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class Account < BaseModel
3
5
  attribute :droplet_limit
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class Action < BaseModel
3
5
  attribute :id
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class Balance < BaseModel
3
5
  attribute :month_to_date_balance
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'virtus'
2
4
  require 'droplet_kit/utils'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class CDN < BaseModel
3
5
  attribute :id
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class Certificate < BaseModel
3
5
  attribute :id
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ContainerRegistry < BaseModel
3
5
  [:name].each do |key|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ContainerRegistryRepository < BaseModel
3
5
  [:registry_name,:name,:latest_tag,:tag_count].each do |key|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class ContainerRegistryRepositoryTag < BaseModel
3
5
  [:registry_name,:repository,:tag,:manifest_digest,:compressed_size_bytes,:size_bytes,:updated_at].each do |key|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class Database < BaseModel
3
5
  attribute :name
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseBackup < BaseModel
3
5
  attribute :created_at
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseCluster < BaseModel
3
5
  attribute :id
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DropletKit
2
4
  class DatabaseConnection < BaseModel
3
5
  attribute :uri