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

Ws RC and Catalog changes #17

Closed
wants to merge 3 commits into from
Closed

Ws RC and Catalog changes #17

wants to merge 3 commits into from

Conversation

michaelkad
Copy link
Collaborator

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

- Add VM no storage to deployment type
- update read RC resource
- update SKD(FindByName ->isService, GetServiceName)add "composite" in the check
@michaelkad
Copy link
Collaborator Author

SDK Changes needed

func (r *resourceCatalog) GetServiceName(serviceID string) (string, error) {
	request := rest.GetRequest(helpers.GetFullURL(*r.client.Config.Endpoint, "/api/v1/"+serviceID))
	resp := map[string]interface{}{}
	_, err := r.client.SendRequest(request, &resp)
	if err != nil {
		return "", err
	}
	if resp["kind"] == "runtime" || resp["kind"] == "service" || resp["kind"] == "iaas" || resp["kind"] == "platform_service" || resp["kind"] == "template" || resp["kind"] == "composite" {
		if name, ok := resp["name"].(string); ok {
			return name, nil
		}
		return "", nil
	}
	return "", bmxerror.New(ErrCodeServiceDoesnotExist,
		fmt.Sprintf("Given service : %q doesn't exist", serviceID))
}

In FindByName

func isService(e models.Service) bool {
	// TODO: COS is 'iaas' kind, but considered to be a service
	if e.Kind == "service" || e.Kind == "iaas" || e.Kind == "composite" {
	
		return true
	}
	return false
}

@michaelkad
Copy link
Collaborator Author

Not needed.

@michaelkad michaelkad closed this Dec 4, 2023
@michaelkad michaelkad deleted the ws-test-create branch March 6, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant