Skip to content
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

Enhancement internal external urls #647

Merged

Conversation

BenjamenMeyer
Copy link
Contributor

@BenjamenMeyer BenjamenMeyer commented Jul 13, 2016

  • Add support for Internal URLs in addition to the Public URLs, by default they are the same; external APIs can make the different if desired.
  • Use the Service ID as the unique identifier instead of the Service Name
  • Add remaining infrastructure or correct existing infrastructure to support the implementation of the RESTful interfaces for the OSKSCATALOG and related OSKSADM extensions; corrections were due to better understandings of the extensions during RESTful implementation.
  • Add RESTful interfaces for the OSKSCATALOG extension, and a couple OSKSADM extension interfaces related to the same support
  • OSKSCATALOG/OSKSADM functionality is supported both globally (all users) and for specific tenants

BenjamenMeyer added 24 commits May 13, 2016 19:14
- Added ability to get the listing of External APIs from MimicCore
- Added ability to remove an External API from MimicCore
- Added a couple functional interfaces to the requirements of the
  IEndPointTemplate interface
- Added support for HTTP conflict and unauthorized responses for
  Identity.
- Added a new EndpointTemplateStore to manage a single instance
  of an IEndPointTemplate.
- Add a MIMIC-OS-KSCATALOG extension to Identity for
  listing/creating/deleting external API services within Mimic
- Start support of OS-KSCATALOG extension; mapped out the end-point
  template support, implementing just the listing and initial auth.
…oskscatalog_endpoint_templates

Conflicts:
	mimic/imimic.py
	mimic/test/dummy.py
	mimic/test/test_identity_objects.py
- Add Endpoint template support and associated tests
- Added requirement that the Endpoint Template's service type must
  match that of the ExternalApiStore that is hosting it.
…oskscatalog_endpoint_templates

Conflicts:
	mimic/test/test_identity_objects.py
- bugfix: fix formatting per lint
- bugfix: forgot to check in some code for model/idenity_objects.py in last real commit (before merges)
- bugfix: correct the coverage report so that developers can see same precision as codecov.io generates for github PR gate checking
- add implementation for the RESTful API to update a template
- refactor: put the verb in test object's setUp since all the test
  functions use the same HTTP verb
- add missing test for service deletion
- Refactored the service management MIMIC-OSKSCATALOG API to be a
  variation of the OS-KSADM Keystone Extension. There are some
  differences which are documented in the REST interface.
…oskscatalog_endpoint_templates

- Updated tests for some of the changes
- API was written as a single JSON-based API; but template id
  needed to be a parameter to two of the operations (update, and
  delete).
- Added the endpoint for removing an external API template
- Removed some header lines that were there fore debug purposes.
- Moved get_template_id() from test_identity_oskscatalog to helpers
- Added support for a 'has_template' to ExternalApiStore in order
  to speed up finding the API that owned a given template id.
- Added support for the OS-KSCATALOG Tenant-Specific List Endpoints
- Changed the Endpoint Template serialization to support serializing
  for a tenant as the information is a little different.
- Updated existing OS-KSCATALOG support to include the 'links'
  section. The limit/marker support is not implemented but this at
  least makes the JSON structure compliant. (Note: there is not
  information on what the internals of the 'links' should look like.)
- Added or updated tests as appropriate for the above
- Enhancement: Require all APIs to have unique template ids across
  every API.
- Enhancement: Implement REST API for enabling a specific template
  id for a specific tenant.
- Bug Fix: template id
- Add + update tests accordingly
- Added REST API to disable a template for a tenant.
- Does not affect globally enabled templates.
- Template must first have been enabled for the tenant.
…s only

- The documentation does not explicitly say to, but the examples imply
  that the list of templates returned when listing for a specific
  tenant should be limited to only those that are enabled for the
  tenant.
- Also provide internal URLs in the service catalog.
- Correct the error message regarding the sharing the same UUID on
  add to generate a conflict error message regarding the UUID instead
  of on the name
- Don't allow two externals APIs to share the same display name
- Provide the ability to put %tenant_id% (or a template provided
  variation) into the URLs of the External APIs and switch it out
  with the tenant-id when providing it in the service catalog.

Note: One of the tests seems to have a weird side-effect making
  other tests fail. The test was amended to reset some values
  after finishing the test. A better solution is desirable.
- Correct bug in making example API instances where the default
  could end up being a global instance instead of a test-specific
  instance
Conflicts:
	mimic/model/identity_objects.py
	mimic/test/dummy.py
- added test to cover another branch of the code
- updated the docstring on a test to better clarify its use-case
- renamed a test to clarify it and order it in the output properly
- updated variable names to comply with the code for continuity
@codecov-io
Copy link

codecov-io commented Jul 13, 2016

Current coverage is 99.55% (diff: 99.67%)

Merging #647 into master will decrease coverage by <.01%

@@             master       #647   diff @@
==========================================
  Files            78         78          
  Lines          5225       5402   +177   
  Methods           0          0          
  Messages          0          0          
  Branches        721        772    +51   
==========================================
+ Hits           5202       5378   +176   
  Misses           10         10          
- Partials         13         14     +1   

Powered by Codecov. Last update a57eb39...b251793

- Made some comments clearer
- Switched around some logic to make it simpler, easier to follow,
  and easier to test.
- Corrected a couple tests to increase code coverage
- Added a few missing tests
@BenjamenMeyer
Copy link
Contributor Author

Note: 2194 of the new lines are for tests.

@BenjamenMeyer
Copy link
Contributor Author

@glyph sorry for the size - this should make the new functionality usable by all.

@glyph
Copy link
Contributor

glyph commented Jul 19, 2016

@BenjamenMeyer - +3k? Jeez. Is there any way to split this up?

BenjamenMeyer pushed a commit to BenjamenMeyer/mimic that referenced this pull request Jul 19, 2016
BenjamenMeyer pushed a commit to BenjamenMeyer/mimic that referenced this pull request Jul 19, 2016
@BenjamenMeyer
Copy link
Contributor Author

BenjamenMeyer commented Jul 19, 2016

@glyph if y'all promise to do reviews faster then I'll push it in a series (PR #648 being the first in that series). The series will consist of 4 parts:

I am concerned that code coverage may not be quite up to par in the individual parts of the series.

@glyph
Copy link
Contributor

glyph commented Jul 19, 2016

@BenjamenMeyer Review speed is largely a function of PR size :). Small PRs that I can easily absorb in one sitting will definitely get reviewed faster. A 3K line PR is going to need to wait until I have an entire day set aside for Mimic only, which is likely to push it out weeks or more. I think you noticed a big gap because I was at conferences, then on vacation, and the other primary maintainer is on maternity leave, so there was just nobody left to do anything. I look at the PR list every day that I'm at work.

@BenjamenMeyer
Copy link
Contributor Author

@glyph understood; as I said - I'm happy to break it down to smaller PRs if it helps to make things go faster.

@BenjamenMeyer
Copy link
Contributor Author

#648 fully ready for review

@BenjamenMeyer
Copy link
Contributor Author

Note: Keeping this hear until it's completed in merges via other PRs.

Added the ☔ to denote it's coverage as such.

@glyph glyph merged commit f3fa3a4 into rackerlabs:master Aug 10, 2016
BenjamenMeyer pushed a commit to BenjamenMeyer/mimic that referenced this pull request Aug 23, 2016
BenjamenMeyer pushed a commit to BenjamenMeyer/mimic that referenced this pull request Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants