Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Conversation

@subhankarc
Copy link
Contributor

@subhankarc subhankarc commented Feb 26, 2018

  • Parameterized the path that gets registered as broker.
  • Added settings for supported_platform and osbapi_compliant_name
  • Catalogs are shown based on the supported_platform
  • Changed implementation for PlatformManagers, instance assignment is removed from it.
  • Added new test for K8S catalog
  • Fixed Quota test which was changing the catalog
  • Removed the unnecessary CC API version check

Also, see cloudfoundry/servicebroker#442 and cloudfoundry/servicebroker#452

* Parameterized the path that gets registered as broker.
* Added settings for supported_platform and osbapi_compliant_name
* Catalogs are shown based on the supported_platform
* Changed implementation for PlatformManagers, instance assignment is removed from it.
* Added new test for K8S catalog
* Fixed Quota test which was changing the catalog
@cfdreddbot
Copy link

Hey subhankarc!

Thanks for submitting this pull request!

All pull request submitters and commit authors must have a Contributor License Agreement (CLA) on-file with us. Please sign the appropriate CLA (individual or corporate).

When sending signed CLA please provide your github username in case of individual CLA or the list of github usernames that can make pull requests on behalf of your organization.

If you are confident that you're covered under a Corporate CLA, please make sure you've publicized your membership in the appropriate Github Org, per these instructions.

Once you've publicized your membership, one of the owners of this repository can close and reopen this pull request, and dreddbot will take another look.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/155509320

The labels on this github issue will be updated when the story is started.

@subhankarc subhankarc changed the title Catalog handling in case of cross consumption Catalog handling to filter plans/services in case of cross consumption Mar 5, 2018
Copy link

@kamath-prasad kamath-prasad left a comment

Choose a reason for hiding this comment

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

minor comments.

}

static getPlatformManager(platform) {
const PlatformManager = (platform && CONST.PLATFORM_MANAGER[platform]) ? require(`./${CONST.PLATFORM_MANAGER[platform]}`) : undefined;

Choose a reason for hiding this comment

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

attribute name should start with small case here - platformManager

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As it is a class reference, kept it as PlatformManager

supportUrl: 'https://sap.com/'
dashboard_client:
id: 'service-fabrik-blueprint-client'
secret: 'service-fabrik-blueprint-secret'

Choose a reason for hiding this comment

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

maybe its better to have a new plan to have support for k8s and leave the current one's for cf as the plan name in k8s has to be in different format ?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There will not be any new plan. The same existing BOSH plans will be shown for K8S as well.

Copy link
Contributor

@jagadish-kb jagadish-kb left a comment

Choose a reason for hiding this comment

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

Per discussion please also update the method ensurePlatformContext.


PLATFORM_MANAGER: {
'cloudfoundry': 'CfPlatformManager'
'cloudfoundry': 'CfPlatformManager',
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of duping, would it rather make sense to set PLATFORM_ALIAS in context at the top of broker processing? that way we always access the manager class via the alias?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have change this and removed the duped ones. Have handled that in the getPlatformManager code.

return;
} else {
throw new PreconditionFailed(`At least Broker API version ${minVersion} is required.`);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The below ensures that if the calls from CF are coming in, then for the dependencies of SF on CF are checked via this. This might be true always, but nevertheless a check that could help in rarest of scenarios. Obviously if we are never going to increase the version of minCloudControllerApiVersion & we for sure know CF is already upgraded above this version then this check is unnecessary. Nevertheless worth a discussion before removal.

Copy link
Contributor

Choose a reason for hiding this comment

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

Post discussion, this is not needed. Keeping this comment for history.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure.


get platform() {
return this.context.platform;
getPlatformSpecificCatalog(catalog) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Platformmanager is to return things platformSpecifc :-), so may be can we strip this from the method name and just keep it getCatalog. Also can return undefined from BasePlatformManager as its implementation from specific manager is absent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:) changed it.

changing the name of method getCatalog in platform specific catalog filtering
Removed the duped key values
Copy link
Contributor

@jagadish-kb jagadish-kb left a comment

Choose a reason for hiding this comment

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

good to go!

@jagadish-kb jagadish-kb merged commit b9cc514 into cloudfoundry:master Mar 7, 2018
@subhankarc subhankarc deleted the feature/crossconsumption branch June 14, 2018 03:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants