shijl0925 / python-sonarqube-api

Python Client library for interacting with Community, Developer, and Enterprise Editions SonarQube's REST APIs and SonarCloud's REST APIs.
https://python-sonarqube-pro-api.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
133 stars 77 forks source link

'SonarQubeClient' object has no attribute 'settings' #90

Closed dvelardez closed 7 months ago

dvelardez commented 1 year ago

I can no longer update the settings although the documentation indicates that it is possible. This commit breaks the compatibility of my app, is there a workaround to update SonarQube settings?

I am getting this error on my app: 'SonarQubeClient' object has no attribute 'settings' Below is a part of my code:

def update_settings(args):
    # oidc configuration
    sonar = SonarQubeClient(sonarqube_url=args.Url, username=args.Username, password=args.Password)
    sonar.settings.update_setting_value(key='sonar.core.serverBaseURL', value=args.Url)
    sonar.settings.update_setting_value(key='sonar.auth.oidc.enabled', value='true')
    sonar.settings.update_setting_value(key='sonar.auth.oidc.issuerUri', value=args.IssuerURI)
    sonar.settings.update_setting_value(key='sonar.auth.oidc.clientId.secured', value=args.ClientID)
    sonar.settings.update_setting_value(key='sonar.auth.oidc.clientSecret.secured', value=args.ClientSecret)
    sonar.settings.update_setting_value(key='sonar.auth.oidc.groupsSync', value='true')
    sonar.settings.update_setting_value(key='sonar.auth.oidc.groupsSync.claimName', value=args.GroupsClaimName)

I appreciate if you can help me.

shijl0925 commented 7 months ago

Only available on the professional edition https://python-sonarqube-pro-api.readthedocs.io/en/latest/examples/settings.html