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

Can't add server name to service group members #26

Closed
Priteshkal opened this issue Jan 7, 2019 · 5 comments
Closed

Can't add server name to service group members #26

Priteshkal opened this issue Jan 7, 2019 · 5 comments
Assignees

Comments

@Priteshkal
Copy link

Hi,

I am trying to add a specific server name when I try to add a service group member to a service group using terraform. I see in the code for service group that currently the only things that are being parsed out from the arguments are:
IP Address, Port and Weight.

servicegroupMembers := make([]string, 0, len(boundMembers))
	for _, member := range boundMembers {
		ip := member["ip"].(string)
		port := member["port"].(float64) //TODO: why is this not int?
		weight := member["weight"].(string)
		strmember := fmt.Sprintf("%s:%.0f:%s", ip, port, weight)
		servicegroupMembers = append(servicegroupMembers, strmember)
	}
	d.Set("servicegroupmembers", servicegroupMembers)

Can we have the ability to add a server name to this list so that its easier to find the servers in a service group by their names rather than IP address?

There is an argument that could be passed in the API call to add a server name:
d.Set("servername", data["servername"])

Thanks

@Priteshkal
Copy link
Author

Hi,

Is there any update on this?

Thanks

@Priteshkal
Copy link
Author

Trying to follow up on this? Anything new for this?

@olljanat
Copy link
Contributor

@Priteshkal unfortunately it looks to be that this provider is not actively developed by Citrix.

Anyway, if you create PR of that change based on contributing guideline it will get merged (I have got some which was important for us).

@giorgos-nikolopoulos
Copy link
Contributor

The following PR ( #29 )adds the ability to define servicegroup members by using the servername.

Let us know if this solution fits your needs.

@Priteshkal
Copy link
Author

Hi,

Thank you for making this PR. I tried using this provider but here is what I noticed:

  1. When I add server to the service group using IP, the provider is able to create a new server where the servername and ip are both the ip address.
  2. When I try to add server to the service group using servername, the provider does not create a new server and hence its not able to bind the server to the service group unless a server with that name already exists on the netscaler.

The functionality that I was looking for in my automation was the ability to create a server with a servername and an IP . (both together) and to add it to my service group on creation of my VM.

I see in the code that there are if/else clause which makes it so that we can either add a server by IP or by servername but not make a server by using both those attributes together.

Is there any way we could reopen this issue to add that ability?

Thanks

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

No branches or pull requests

3 participants