These forums are a place for learning, helping and sharing experiences with others about any of our products. Feel free to ask a question and get answers from our community and our most advanced users.
Note that these are public forums - anyone can view the discussions here.
VISIT OUR DIFFERENT FORUMS:
Announcements > | |
CloudShell > | TestShell > |
Developers > | BI (Business Inteligence) > |
This is where you can suggest your ideas to help and improve the product for everyone.
Please make sure to read the following article before posting a new idea, to get more information about the required information and ideas lifecycle.
Feel free to vote and comment on other ideas to promote them.
Thanks for everyone who suggested the ideas and voted for them.
Find, download and share integrations that can extend and enhance the CloudShell experience.
Integrations have several levels:
Certified - Officially tested and supported by Quali.
Preview - Provides a sneak peek to what the Quali team is developing. Officially supported by Quali. Feel free to experiment and comment, but please take into consideration that it is not yet tested and released.
Community - Integrations shared by community users. Feel free to look into what other users have contributed, please take into consideration that these integrations are not tested by Quali.
To learn more about creating Shells and integrating with CloudShell, use the following links:
CloudShell's Dev Guide > | Configuration Management > |
Getting started with Shells > | Extending CloudShell with Cloud Providers > |
Getting started with Orchestration > | API Guide > |
To share your integration, follow the instructions in this guide >.
Right now when I make a trunk and give it a range, my vlan service gives me a consecutive range.
What I want is to be able to have non consecutive vlans in a trunk.
As an example, suppose I have a reservation that has a trunk with 10 vlans, and it is currently using VLAN ids "5-14".
Now suppose I make another reservation that uses 10 vlans. Currently, the Vlans that will get assigned are "15-24". I want instead to use all available vlans from vlan id 1, so the reservation would have a trunk with "1-4,15-20".
I don't know what is the default behavior from the vlan service, as I seem to have a vlan driver that is not default.
I inherited this code, so I don't know exactly what it does. Would anyone be able to explain it? the parts that seem relevant are:
session=CloudShellAPISession
request = session.CheckoutFromPool(...)
session.SetServiceAttributesValues(...)
Can anyone clarify how the CheckoutFromPool works? Would this be the one reserving the VLANs?
I see that i takes key/values: "type" : "NextAvailableNumericRangeFromRange"
Is there a place where we can see what this "type" does, and what are the allowed values?
I think some configuration here is forcing the vlans to be consecutive. Maybe it's the key "Isolation" : "Exclusive"
Any pointers would be helpful.
(Let me know if there's a better place to ask these questions).
def get_vlan_range(self, context): """ A simple example function :param ResourceCommandContext context: the context the command runs on """ vlan_length = context.resource.attributes['Trunk Length'] if not vlan_length: return if int(vlan_length) == 0: return session = CloudShellAPISession(host=context.connectivity.server_address,token_id=context.connectivity.admin_auth_token, domain=context.reservation.domain) Allocation_range = context.resource.attributes['Allocation Ranges'].split('-') request = '{{ "type" : "NextAvailableNumericRangeFromRange", "poolId" : "{pool_id}", "reservationId" : "{reservation_id}",' \ ' "ownerId" : "{service_id}", "isolation" : "Exclusive", "length" : {range_lenth} , "requestedRange" : {{ "start" : {aloc_start} , "end" : {aloc_end} }} }} ' \ .format(reservation_id=context.reservation.reservation_id, service_id=context.resource.id, aloc_start=Allocation_range[0], aloc_end=Allocation_range[1], range_lenth=int(vlan_length), pool_id=context.reservation.domain) items =[] pool_result = session.CheckoutFromPool(selectionCriteriaJson=request) items.extend(pool_result.Items) request = [AttributeNameValue("Virtual Network",items[0] + "-" + items[-1] ),AttributeNameValue("Trunk Length", '0')] session.WriteMessageToReservationOutput(context.reservation.reservation_id, 'first item {0} last item {1}'.format(items[0], items[-1])) session.SetServiceAttributesValues(serviceAlias=context.resource.fullname, attributeRequests=request,reservationId=context.reservation.reservation_id) return items
Answer by Yaniv Kalsky · Jan 16, 2019 at 03:04 PM
In short, NextAvailableNumericRangeFromRange cannot generate a range as you require.
This is not a public/documented api and since it's a custom implementation that was done for you, please contact your customer success manager (Ayelet) to go over other options.
Yaniv
These forums are a place for learning, helping and sharing experiences with others about any of our products. Feel free to ask a question and get answers from our community and our most advanced users.
Note that these are public forums - anyone can view the discussions here.
Announcements | |
CloudShell | TestShell |
Developers | BI (Business Inteligence) |
This is where you can suggest your ideas to help and improve the product for everyone.
Please make sure to read the following article before posting a new idea, to get more information about the required information and ideas lifecycle.
Feel free to vote and comment on other ideas to promote them.
Thanks for everyone who suggested the ideas and voted for them.
Find, download and share integrations that can extend and enhance the CloudShell experience.
Integrations have several levels:
Certified - Officially tested and supported by Quali.
Preview - Provides a sneak peek to what the Quali team is developing. Officially supported by Quali. Feel free to experiment and comment, but please take into consideration that it is not yet tested and released.
Community - Integrations shared by community users. Feel free to look into what other users have contributed, please take into consideration that these integrations are not tested by Quali.
To learn more about creating Shells and integrating with CloudShell, use the following links:
CloudShell's Dev Guide | Configuration Management |
Getting started with Shells | Extending CloudShell with Cloud Providers |
Getting started with Orchestration | API Guide |
To share your integration, follow the instructions in this guide.
Blueprint Input Parameters at Setup Time 3 Answers
Adding behavior to a resource 2 Answers
How to create a reservation in Studio using the REST tool? 3 Answers
How to use 2 ssh sessions in a shell 11 Answers