-
Notifications
You must be signed in to change notification settings - Fork 682
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
[W.I.P] Dev docs for Inspec::Backend #6831
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for chef-inspec canceled.
|
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
e06672b
to
b30726c
Compare
* identify the target operating system via os | ||
* authenticate to API-based services and treat them like a platform | ||
|
||
When inspec exec command is run with --target option it establishes the connection to that target using speficifed transport like ssh, winrm etc. By default it uses local transport if the --target is not provided. Backend class is responsible for creating this transprot and establish connection using train. |
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.
You should probably mention that tran transports are plugins - gems that can be externally loaded and maintained outside of InSpec and Train.
## Mock backend | ||
|
||
Mock is used primarily for testing and debugging. This is used to create a dummy connection. | ||
InSpec use Mock backend in unit testing environment and some places in code base where backend object is required but it does not require for any real time connection or execution of commands. For example inspec export, check, archive are some of the cli commands uses mock bockend as it required by profile object( https://github.com/inspec/inspec/blob/main/lib/inspec/config.rb#L187) else if not provided it creates the backend with local(https://github.com/inspec/inspec/blob/main/lib/inspec/config.rb#L187) transport which is not required for export, check and archive. |
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.
When writing devdocs, use permalink URLs - line 187 may change over time.
It call unpack_train_credentials of config.rb which returns the hash containing backend, logger and few more details | ||
example |
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.
Try to explain at the level of intent. "Why" is it doing that. Why is important that it does what it is doing. Highlight the important parts and omit the routine parts. Thanks!
Description
Dev docs to understand
Related Issue
Types of changes
Checklist: