{"action":"closed","issue":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2770","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2770/labels{/name}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2770/comments","events_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2770/events","html_url":"https://github.com/SatelliteQE/robottelo/issues/2770","id":106079036,"number":2770,"title":"Improve robottelo configuration parsing","user":{"login":"elyezer","id":48132,"avatar_url":"https://avatars.githubusercontent.com/u/48132?v=3","gravatar_id":"","url":"https://api.github.com/users/elyezer","html_url":"https://github.com/elyezer","followers_url":"https://api.github.com/users/elyezer/followers","following_url":"https://api.github.com/users/elyezer/following{/other_user}","gists_url":"https://api.github.com/users/elyezer/gists{/gist_id}","starred_url":"https://api.github.com/users/elyezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyezer/subscriptions","organizations_url":"https://api.github.com/users/elyezer/orgs","repos_url":"https://api.github.com/users/elyezer/repos","events_url":"https://api.github.com/users/elyezer/events{/privacy}","received_events_url":"https://api.github.com/users/elyezer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"elyezer","id":48132,"avatar_url":"https://avatars.githubusercontent.com/u/48132?v=3","gravatar_id":"","url":"https://api.github.com/users/elyezer","html_url":"https://github.com/elyezer","followers_url":"https://api.github.com/users/elyezer/followers","following_url":"https://api.github.com/users/elyezer/following{/other_user}","gists_url":"https://api.github.com/users/elyezer/gists{/gist_id}","starred_url":"https://api.github.com/users/elyezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyezer/subscriptions","organizations_url":"https://api.github.com/users/elyezer/orgs","repos_url":"https://api.github.com/users/elyezer/repos","events_url":"https://api.github.com/users/elyezer/events{/privacy}","received_events_url":"https://api.github.com/users/elyezer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones/65","html_url":"https://github.com/SatelliteQE/robottelo/milestones/Week%20of%20October%2005,%202015","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones/65/labels","id":1342729,"number":65,"title":"Week of October 05, 2015","description":"","creator":{"login":"elyezer","id":48132,"avatar_url":"https://avatars.githubusercontent.com/u/48132?v=3","gravatar_id":"","url":"https://api.github.com/users/elyezer","html_url":"https://github.com/elyezer","followers_url":"https://api.github.com/users/elyezer/followers","following_url":"https://api.github.com/users/elyezer/following{/other_user}","gists_url":"https://api.github.com/users/elyezer/gists{/gist_id}","starred_url":"https://api.github.com/users/elyezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyezer/subscriptions","organizations_url":"https://api.github.com/users/elyezer/orgs","repos_url":"https://api.github.com/users/elyezer/repos","events_url":"https://api.github.com/users/elyezer/events{/privacy}","received_events_url":"https://api.github.com/users/elyezer/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2015-10-07T13:41:45Z","updated_at":"2015-10-20T12:11:13Z","due_on":"2015-10-11T03:00:00Z","closed_at":null},"comments":5,"created_at":"2015-09-11T19:34:04Z","updated_at":"2015-10-20T12:11:13Z","closed_at":"2015-10-20T12:11:13Z","body":"Let's bring robottelo configuration parsing to a next level. Need to make the config object smart enough to tell if some feature can be tested or not. For example, suppose the user have not configured vm provisioning tests that depends on that feature should be skipped.\r\n\r\nAlso if user indicates that wants to use that feature, let's say by having the config header in place, then robottelo should properly validate the configuration and raise exception if something is missing. With that said, we can have a minimal set of required configuration and other optional (basically the ones that depends on extra infrastructure). Robottelo should be smart enough to identify that and act accordingly.\r\n\r\nBased on the current state, will be described some of the changes needed to accomplish the proposed solution:\r\n\r\nCurrently configuration are accessed by reading values from the properties dictionary. This leave room for some issues like when accessing a key that is not set during import time, making the entire module import fail. In order to improve this all config parsing should happen when robottelo is imported and if some required configuration is missing a ImproperlyConfigured exception should be raised with all detailed information about what is missing. For example we can't run any test with at least the Satellite server URL and admin user and password, instead of failing for the first missing configuration we should provide the complete information to the user and being clear about what are the required configuration.\r\n\r\nFor the optional configuration, or configuration that requires extra infrastructure other than a installed Satellite server, the config should provide methods to check if that is available. Then tests can be skipped by checking if the the extra infrastructure information is in place or not. For example, vm provisioning to allow clients creation, if that configuration is not in place then is better to just skip the tests that requires it than block the entire test execution.\r\n\r\nThe goal of this is make robottelo easier to be used by everyone and require as less as possible configuration for a quick start."}}