Matthew Treinish | 55511d9 | 2016-02-23 10:55:53 -0500 | [diff] [blame] | 1 | .. _library: |
| 2 | |
Rodrigo Duarte | 6af041a | 2016-03-07 12:17:08 -0300 | [diff] [blame] | 3 | Tempest Library Documentation |
Matthew Treinish | 55511d9 | 2016-02-23 10:55:53 -0500 | [diff] [blame] | 4 | ============================= |
| 5 | |
| 6 | Tempest provides a stable library interface that provides external tools or |
| 7 | test suites an interface for reusing pieces of tempest code. Any public |
| 8 | interface that lives in tempest/lib in the tempest repo is treated as a stable |
| 9 | public interface and it should be safe to external consume that. Every effort |
Andrea Frittoli (andreaf) | 1370baf | 2016-04-29 14:26:22 -0500 | [diff] [blame] | 10 | goes into maintaining backwards compatibility with any change. |
| 11 | The library is self contained and doesn't have any dependency on |
| 12 | other tempest internals outside of lib (including no usage of tempest |
| 13 | configuration). |
Matthew Treinish | 55511d9 | 2016-02-23 10:55:53 -0500 | [diff] [blame] | 14 | |
| 15 | Stability |
| 16 | --------- |
Andrea Frittoli (andreaf) | 1370baf | 2016-04-29 14:26:22 -0500 | [diff] [blame] | 17 | Any code that lives in tempest/lib will be treated as a stable interface. |
Matthew Treinish | 55511d9 | 2016-02-23 10:55:53 -0500 | [diff] [blame] | 18 | This means that any public interface under the tempest/lib directory is |
| 19 | expected to be a stable interface suitable for public consumption. However, for |
| 20 | any interfaces outside of tempest/lib in the tempest tree (unless otherwise |
| 21 | noted) or any private interfaces the same stability guarantees don't apply. |
| 22 | |
| 23 | Adding Interfaces |
| 24 | ''''''''''''''''' |
| 25 | When adding an interface to tempest/lib we have to make sure there are no |
| 26 | dependencies on any pieces of tempest outside of tempest/lib. This means if |
| 27 | for example there is a dependency on the configuration file we need remove that. |
| 28 | The other aspect when adding an interface is to make sure it's really an |
| 29 | interface ready for external consumption and something we want to commit to |
| 30 | supporting. |
| 31 | |
| 32 | Making changes |
| 33 | '''''''''''''' |
| 34 | When making changes to tempest/lib you have to be conscious of the effect of |
| 35 | any changes on external consumers. If your proposed changeset will change the |
| 36 | default behaviour of any interface, or make something which previously worked |
| 37 | not after your change, then it is not acceptable. Every effort needs to go into |
| 38 | preserving backwards compatibility in changes. |
| 39 | |
| 40 | Reviewing |
| 41 | ''''''''' |
| 42 | When reviewing a proposed change to tempest/lib code we need to be careful to |
| 43 | ensure that we don't break backwards compatibility. For patches that change |
| 44 | existing interfaces we have to be careful to make sure we don't break any |
| 45 | external consumers. Some common red flags are: |
| 46 | |
Masayuki Igawa | b78b923 | 2017-11-17 16:12:37 +0900 | [diff] [blame] | 47 | * a change to an existing API requires a change outside the library directory |
| 48 | where the interface is being consumed |
| 49 | * a unit test has to be significantly changed to make the proposed change pass |
Matthew Treinish | 55511d9 | 2016-02-23 10:55:53 -0500 | [diff] [blame] | 50 | |
| 51 | Testing |
| 52 | ''''''' |
| 53 | When adding a new interface to the library we need to at a minimum have unit |
| 54 | test coverage. A proposed change to add an interface to tempest/lib that |
| 55 | doesn't have unit tests shouldn't be accepted. Ideally these unit tests will |
| 56 | provide sufficient coverage to ensure a stable interface moving forward. |
| 57 | |
| 58 | Current Library APIs |
| 59 | -------------------- |
| 60 | |
| 61 | .. toctree:: |
| 62 | :maxdepth: 2 |
| 63 | |
| 64 | library/cli |
| 65 | library/decorators |
| 66 | library/rest_client |
| 67 | library/utils |
Ghanshyam | 1f47cf9 | 2016-02-25 04:57:18 +0900 | [diff] [blame] | 68 | library/api_microversion_testing |
Masayuki Igawa | eb11b25 | 2016-06-10 10:40:02 +0900 | [diff] [blame] | 69 | library/auth |
Andrea Frittoli (andreaf) | e07579c | 2016-08-05 07:27:02 +0100 | [diff] [blame] | 70 | library/clients |
Matthew Treinish | c51b712 | 2017-07-17 12:28:07 -0400 | [diff] [blame] | 71 | library/credential_providers |
Andrea Frittoli | 0477acc | 2017-08-09 21:14:53 +0100 | [diff] [blame] | 72 | library/validation_resources |