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 >.
I'm trying to solve this in a way going forward, so we teach them how to write the output file in TestCenter correctly the first time so it's going to be useable with any port that's happens to be in the blueprint.
Answer by Song Chen · Feb 24, 2021 at 10:47 PM
Hi Kimo,
Will it be ok to use xml file instead of tcc? Not sure if the following may work out for you.
Have a template xml test file, and in it have Port elements like this:
<Port id="7143"
Location="//MyAddress/Chassis/Port"
UseDefaultHost="TRUE"
AppendLocationToPortName="TRUE"
Layer3Type="IPV4"
PortGroupSize="1"
TestModuleProfile="Default"
IsFlexEthernetPort="FALSE"
IsFlexEthernetPhy="FALSE"
IsFlexEthernetClient="FALSE"
IsPgaPort="TRUE"
Active="TRUE"
LocalActive="TRUE"
Name="MyPortName Port //Chassis/Port">
... ...
</Port>
Then based on the actual ports in the sandbox, e.g. ['Port //4/15', '//172.16.254.254/4/15'; 'Port //4/16', '//172.16.254.254/4/16'], replace the Location and Name values, save the modified file and use it as the actual test file.
Answer by Yoram Shamir · Feb 27, 2021 at 07:53 AM
To load a configuration, you need to copy the names of the ports in the tcc file into the Logical Name attributes of the Ports sub-resources in the reservation.
If the name in the tcc is 'Port //3/1' then this is what you should place in the Logical name attribute.
In you case the name in the tcc is 'Port //3/1' but the logical name attributes have values of Port //2/8' and 'Port //2/9'.
A good port name in tcc should reflect the port role in the configuration, not it's location. For example, Client, Server etc.
I suggest you create your tcc with meaningful names, regardless of CS. Then set those names in the Logical Name attribute. I don't think you should adjust your tcc to the reservation but the other way around - adjust your reservation to the tcc.
If you have two tcc files with different port roles, for example in one tcc you have Client and Server, and in another you have User and Router then probably they are used with different test beds, hence different blueprints, so again, you can set different Logical Names in the different blueprints.
Answer by Kimo Saper · Mar 01, 2021 at 09:35 PM
Here is a sample script that writes to the XML port information. Note how the address is formatted, you'll have to modify it from CloudShell's info (there are often Modules included that need to be stripped out).
import csv import xml.etree.ElementTree as ET PARSE_FILE = './L3VPN-TEST-2.xml' BLUEPRINT_PORTS = ['//10.10.18.5/6/1', '//10.10.18.5/6/2'] def read_ports(element): port_list = list() """:type list of dict""" ports = element.findall('Project/Port') for port in ports: port_list.append(port) return port_list def main(): tree = ET.parse(PARSE_FILE) root = tree.getroot() ports = read_ports(root) # for port in ports: # print(port.get('Location'), port.get('Name')) idx = 0 for port in ports: if idx < len(BLUEPRINT_PORTS): new_port = BLUEPRINT_PORTS[idx] port.set('Location', new_port) spltz = new_port.split('/') port.set('Name', 'Port //{}/{}'.format(spltz[-2], spltz[-1])) idx += 1 tree.write(PARSE_FILE) # ports = read_ports(root) # for port in ports: # print(port.get('Location'), port.get('Name')) if __name__ == '__main__': main()
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.