From 723fae122ae96898085d27265ced495e33df0eb5 Mon Sep 17 00:00:00 2001 From: Thomas Heinen <33926466+thheinen@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:56:19 +0200 Subject: [PATCH] Enable REST-based resources for target mode (#223) Signed-off-by: Thomas Heinen --- lib/chef/resource/chef_acl.rb | 2 +- lib/chef/resource/chef_client.rb | 2 +- lib/chef/resource/chef_container.rb | 2 +- lib/chef/resource/chef_data_bag.rb | 2 +- lib/chef/resource/chef_data_bag_item.rb | 2 +- lib/chef/resource/chef_environment.rb | 2 +- lib/chef/resource/chef_group.rb | 2 +- lib/chef/resource/chef_mirror.rb | 2 +- lib/chef/resource/chef_node.rb | 2 +- lib/chef/resource/chef_organization.rb | 2 +- lib/chef/resource/chef_resolved_cookbooks.rb | 2 +- lib/chef/resource/chef_role.rb | 2 +- lib/chef/resource/chef_user.rb | 2 +- lib/chef/resource/private_key.rb | 2 +- lib/chef/resource/public_key.rb | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/chef/resource/chef_acl.rb b/lib/chef/resource/chef_acl.rb index a015996..566edcd 100644 --- a/lib/chef/resource/chef_acl.rb +++ b/lib/chef/resource/chef_acl.rb @@ -9,7 +9,7 @@ class Chef class Resource class ChefAcl < Cheffish::BaseResource - provides :chef_acl + provides :chef_acl, target_mode: true # Path of the thing being secured, e.g. nodes, nodes/*, nodes/mynode, # */*, **, roles/base, data/secrets, cookbooks/apache2, /users/*, diff --git a/lib/chef/resource/chef_client.rb b/lib/chef/resource/chef_client.rb index c9fb8f2..02d8dc7 100644 --- a/lib/chef/resource/chef_client.rb +++ b/lib/chef/resource/chef_client.rb @@ -4,7 +4,7 @@ class Chef class Resource class ChefClient < Cheffish::ChefActorBase - provides :chef_client + provides :chef_client, target_mode: true # Client attributes property :chef_client_name, Cheffish::NAME_REGEX, name_property: true diff --git a/lib/chef/resource/chef_container.rb b/lib/chef/resource/chef_container.rb index 76b0bd6..db20d35 100644 --- a/lib/chef/resource/chef_container.rb +++ b/lib/chef/resource/chef_container.rb @@ -5,7 +5,7 @@ class Chef class Resource class ChefContainer < Cheffish::BaseResource - provides :chef_container + provides :chef_container, target_mode: true property :chef_container_name, Cheffish::NAME_REGEX, name_property: true diff --git a/lib/chef/resource/chef_data_bag.rb b/lib/chef/resource/chef_data_bag.rb index 4e49a33..a9d78af 100644 --- a/lib/chef/resource/chef_data_bag.rb +++ b/lib/chef/resource/chef_data_bag.rb @@ -4,7 +4,7 @@ class Chef class Resource class ChefDataBag < Cheffish::BaseResource - provides :chef_data_bag + provides :chef_data_bag, target_mode: true property :data_bag_name, Cheffish::NAME_REGEX, name_property: true diff --git a/lib/chef/resource/chef_data_bag_item.rb b/lib/chef/resource/chef_data_bag_item.rb index d8fc7ff..2be172c 100644 --- a/lib/chef/resource/chef_data_bag_item.rb +++ b/lib/chef/resource/chef_data_bag_item.rb @@ -7,7 +7,7 @@ class Chef class Resource class ChefDataBagItem < Cheffish::BaseResource - provides :chef_data_bag_item + provides :chef_data_bag_item, target_mode: true def initialize(*args) super diff --git a/lib/chef/resource/chef_environment.rb b/lib/chef/resource/chef_environment.rb index e970dcc..4899087 100644 --- a/lib/chef/resource/chef_environment.rb +++ b/lib/chef/resource/chef_environment.rb @@ -6,7 +6,7 @@ class Chef class Resource class ChefEnvironment < Cheffish::BaseResource - provides :chef_environment + provides :chef_environment, target_mode: true property :environment_name, Cheffish::NAME_REGEX, name_property: true property :description, String diff --git a/lib/chef/resource/chef_group.rb b/lib/chef/resource/chef_group.rb index 75c9c5e..070f9f5 100644 --- a/lib/chef/resource/chef_group.rb +++ b/lib/chef/resource/chef_group.rb @@ -6,7 +6,7 @@ class Chef class Resource class ChefGroup < Cheffish::BaseResource - provides :chef_group + provides :chef_group, target_mode: true property :group_name, Cheffish::NAME_REGEX, name_property: true property :users, ArrayType diff --git a/lib/chef/resource/chef_mirror.rb b/lib/chef/resource/chef_mirror.rb index fe5b3da..8873eba 100644 --- a/lib/chef/resource/chef_mirror.rb +++ b/lib/chef/resource/chef_mirror.rb @@ -11,7 +11,7 @@ class Chef class Resource class ChefMirror < Cheffish::BaseResource - provides :chef_mirror + provides :chef_mirror, target_mode: true # Path of the data to mirror, e.g. nodes, nodes/*, nodes/mynode, # */*, **, roles/base, data/secrets, cookbooks/apache2, etc. diff --git a/lib/chef/resource/chef_node.rb b/lib/chef/resource/chef_node.rb index 0ec89cc..a74ea23 100644 --- a/lib/chef/resource/chef_node.rb +++ b/lib/chef/resource/chef_node.rb @@ -6,7 +6,7 @@ class Chef class Resource class ChefNode < Cheffish::BaseResource - provides :chef_node + provides :chef_node, target_mode: true include Cheffish::NodeProperties diff --git a/lib/chef/resource/chef_organization.rb b/lib/chef/resource/chef_organization.rb index f46b29c..e7ec7bb 100644 --- a/lib/chef/resource/chef_organization.rb +++ b/lib/chef/resource/chef_organization.rb @@ -6,7 +6,7 @@ class Chef class Resource class ChefOrganization < Cheffish::BaseResource - provides :chef_organization + provides :chef_organization, target_mode: true property :organization_name, Cheffish::NAME_REGEX, name_property: true property :full_name, String diff --git a/lib/chef/resource/chef_resolved_cookbooks.rb b/lib/chef/resource/chef_resolved_cookbooks.rb index daa807f..9b88a86 100644 --- a/lib/chef/resource/chef_resolved_cookbooks.rb +++ b/lib/chef/resource/chef_resolved_cookbooks.rb @@ -4,7 +4,7 @@ class Chef class Resource class ChefResolvedCookbooks < Cheffish::BaseResource - provides :chef_resolved_cookbooks + provides :chef_resolved_cookbooks, target_mode: true def initialize(*args) super diff --git a/lib/chef/resource/chef_role.rb b/lib/chef/resource/chef_role.rb index 1cf2341..fa2e74e 100644 --- a/lib/chef/resource/chef_role.rb +++ b/lib/chef/resource/chef_role.rb @@ -6,7 +6,7 @@ class Chef class Resource class ChefRole < Cheffish::BaseResource - provides :chef_role + provides :chef_role, target_mode: true property :role_name, Cheffish::NAME_REGEX, name_property: true property :description, String diff --git a/lib/chef/resource/chef_user.rb b/lib/chef/resource/chef_user.rb index c81af89..1455180 100644 --- a/lib/chef/resource/chef_user.rb +++ b/lib/chef/resource/chef_user.rb @@ -4,7 +4,7 @@ class Chef class Resource class ChefUser < Cheffish::ChefActorBase - provides :chef_user + provides :chef_user, target_mode: true # Client attributes property :user_name, Cheffish::NAME_REGEX, name_property: true diff --git a/lib/chef/resource/private_key.rb b/lib/chef/resource/private_key.rb index 04981b1..0d93425 100644 --- a/lib/chef/resource/private_key.rb +++ b/lib/chef/resource/private_key.rb @@ -6,7 +6,7 @@ class Chef class Resource class PrivateKey < Cheffish::BaseResource - provides :private_key + provides :private_key, target_mode: true allowed_actions :create, :delete, :regenerate, :nothing default_action :create diff --git a/lib/chef/resource/public_key.rb b/lib/chef/resource/public_key.rb index 02d6c78..e6042a1 100644 --- a/lib/chef/resource/public_key.rb +++ b/lib/chef/resource/public_key.rb @@ -6,7 +6,7 @@ class Chef class Resource class PublicKey < Cheffish::BaseResource - provides :public_key + provides :public_key, target_mode: true allowed_actions :create, :delete, :nothing default_action :create