Skip to content

refactor coder credentials to load classes dynamically - #967

Open
johrstrom wants to merge 5 commits into
masterfrom
refactor-coder-creds
Open

refactor coder credentials to load classes dynamically#967
johrstrom wants to merge 5 commits into
masterfrom
refactor-coder-creds

Conversation

@johrstrom

@johrstrom johrstrom commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Please review our Contributing Guide before submitting a pull request.

What does this PR do?

This changes the way the coder adapter's credentials are loaded so that they can be dynamically loaded at runtime without using a predefined case statement to load them. That is, users/centers can define these classes then just utilize them without contribution to this library.

Related issue

Closes #___ (if applicable)

Testing

  • Tests included
  • No tests needed — reason: ___

Checklist

  • Follows project code style and conventions
  • Documentation provided (if new feature, adapter or behavior change)
  • This is a large feature and was discussed in an issue first (if applicable)

Anything else?

@andrejcermak & @Satyam-Captain FYI

@johrstrom johrstrom changed the title refactor new credentials to accept kwargs refactor coder credentials to load classes dynamically Aug 25, 2026
def initialize(auth_url, dir)
@auth_url = auth_url
@dir = dir
class OpenstackCredentials < CredentialsInterface

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that typical ruby classes correspond to the file name with _ being transformed into capitalizations.

I.e., this file really should have been open_stack_credentials with the classname OpenStackCredentials.

So I had to change the classname so that the configuration of openstack continues to work (otherwise it would have to be changed to open_stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant