-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor vdir name property to site_name #359
Conversation
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: Justin Schuhmann <jmschu02@gmail.com>
Fix tests for iis_pool
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
this was changed from
Which isn't just the site name or the application name but a possible combination of both, technically this is referred to as the location or path. I went with name just to stop people from being confused |
I agree this should change since there is a bug in chef 13 causing the before mentioned error, but i'd say we go with application_name since that's what it is called in appcmd
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mainly let's go with application_name since it matches the old name for it and the appcmd name for it.
README.md
Outdated
@@ -397,7 +397,7 @@ Allows easy management of IIS virtual directories (i.e. vdirs). | |||
|
|||
#### Attribute Parameters | |||
|
|||
- `name`: name attribute. Specifies the value of the name attribute. This is the name of the website or site + application you are adding it to. | |||
- `site_name`: name attribute. This is the name of the website or site + application you are adding it to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use application_name
this will add backwards compatibility back and not make this more confusing since app.name is the property used in appcmd
@@ -29,9 +29,9 @@ class IisVdir < Inspec.resource(1) | |||
end | |||
" | |||
|
|||
def initialize(name, path) | |||
@name = name | |||
def initialize(path, site_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no reason to invert these, just leave them as is...also change to application name if desired although no required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I inverted them to be consistent with the app
resource.
The problem I ran into with name is that it is also a ruby method. I picked site_name to match the attribute also used in the app resource. Virtual applications and virtual directories are both created under a site so they both seem similar in that regards. |
Virtual directories go onto site and applications, that's the issue. I'm down with this change but it should be application_name since that is the same as appcmd |
Ah, I see what you mean. That makes sense. I'll update that so it is more clear. |
Awesome thanks! And good work catching this. Was this something that you could make fail in a test before your changes and work after? |
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
Signed-off-by: fdzedzy <fdzedzy@frontlinetechnologies.com>
I've got a cookbook that sets up a bunch of apps and virtual directories under a single site with a lot of unique configuration so there were several changes needed to use the new resources. In testing for Chef 13 compatibility I was resolving the duplicate resource issue and my cookbook wouldn't converge when I tried to set the |
@fdzedzy that's weird...hurm, well renaming it should solve that. With the scripts you have can you add the failing items to the unit tests that already exists? basically add it to: |
@EasyAsABC123 Just to follow up, the test you added to cover the trailing slash PR should cover the scenario in this PR. I was thinking of adding another test to add a virtual directory to an application under a default site since this scenario wasn't covered. I can submit a new PR with that test. I'm wondering if that change to not require the / broke the scenario of adding a vdir to an app. Not sure if that is just my cookbook or a real issue yet. |
Most of the merge work is based on the fact that pool provider has been replaced by a custom resource. From all the non-merged criteo patches: 51e609a Fix decoding of entities in XML 5034448 Clarify execute tasks 43186f1 Activate use_inline_resources 99c4187 Remove unnecessary Chef logs 280fba8 Fix regression introduced with whyrun support e85ca2f Fix the site_identifier privacy so that the execute context can use it 12ac82f Post review fixes d534851 Removed new_resource.updated_by_last_action occurences f9b773d Make the pool provider whyrun able all are either unnecessary or correctly applied * 'master' of https://github.com/chef-cookbooks/iis: (145 commits) Adds better documentation for the options parameter (sous-chefs#383) release 6.7.2 (sous-chefs#382) Fix FTP site binding error (sous-chefs#380) Release v6.7.1 (sous-chefs#379) Fix issue with guard clause missing on check (sous-chefs#378) Release v6.7.0 (sous-chefs#376) fix multiple bugs with iis_vdir iis_root iis_app for idempotency (sous-chefs#375) Release v6.6.0 (sous-chefs#373) Update appveyor.yml Enhancement module custom resource (sous-chefs#372) Fix README.md (sous-chefs#367) Release v6.5.3 (sous-chefs#371) Resolves a bug in iis_vdir also adds more liberty in config (sous-chefs#370) Refactor vdir name property to site_name (sous-chefs#359) Release v6.5.2 (sous-chefs#364) Update iis_vdir name to not require a trailing / (sous-chefs#363) Fix iis_pool identity_type issue (sous-chefs#362) Release v6.5.1 (sous-chefs#358) Add quotes to pool name (sous-chefs#357) Release v6.5.0 (sous-chefs#352) ... Change-Id: I951fb2d1788d877c98b24bb22cb5d035162e146d
Description
Refactoring the
name
property on the vdir resource to besite_name
. This mimics thesite_name
property on the app resource. This will allow multiple vdirs to be created on a single site without creating a resource cloning error in Chef 13. Using a property calledname
will cause a property name collision.This would create two virtual directories on the same site without throwing any Chef 13 warnings:
This change also creates consistency between the app and vdir resources.
Tests have been updated to match the app resource.
Check List