Skip to content

Commit

Permalink
Enable REST-based resources for target mode
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Heinen <[email protected]>
  • Loading branch information
thheinen committed Aug 11, 2024
1 parent 9f94cbc commit 5d300e1
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_acl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/*,
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_data_bag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_data_bag_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Chef
class Resource
class ChefNode < Cheffish::BaseResource
provides :chef_node
provides :chef_node, target_mode: true

include Cheffish::NodeProperties

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_resolved_cookbooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/private_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/resource/public_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d300e1

Please sign in to comment.