From 0a4bfaa1eb9d9c330a206a8c259388fd7bd92a89 Mon Sep 17 00:00:00 2001 From: Richard Wellum Date: Thu, 4 Aug 2016 11:16:34 -0400 Subject: [PATCH] Store supports sub directories Fix for vagrant file Remove errant comment in readme --- README.rst | 2 -- iosxr_store_box.py | 8 ++++++-- vagrantfiles/simple-mixed-topo/Vagrantfile | 10 ++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 075762f..f31ddd5 100644 --- a/README.rst +++ b/README.rst @@ -21,8 +21,6 @@ economic benefit of using their existing laptop hardware. Currently this supports IOS XRv (64-bit) only but will be adapted to also handle `IOS XRv 9000`_ images. -Test for githooks - ^^^^^^^^^^^^^^^^^^^^^^^^^ An IOS XRv (64-bit) VM: ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/iosxr_store_box.py b/iosxr_store_box.py index 76ffecc..b3d5774 100755 --- a/iosxr_store_box.py +++ b/iosxr_store_box.py @@ -108,6 +108,8 @@ def main(argv): help='Optionally specify a reason for uploading this box') parser.add_argument('-r', '--release', action='store_true', help="upload to '$ARTIFACTORY_LOCATION_RELEASE' rather than '$ARTIFACTORY_LOCATION_SNAPSHOT'.") + parser.add_argument('-s', '--sub_dir', dest='subdir', required=True, + help="subdirectory to upload to, e.g '6.1.1', 'stable'") parser.add_argument('-v', '--verbose', action='store_const', const=logging.DEBUG, default=logging.INFO, help='turn on verbose messages') @@ -123,6 +125,7 @@ def main(argv): message = args.message artifactory_release = args.release test_only = args.test_only + subdir = args.subdir if not input_box: sys.exit('No input box detected, use -b to specify a box') @@ -140,6 +143,7 @@ def main(argv): logger.debug("Receiver is: '%s'" % receiver) logger.debug("Release is: '%s'" % artifactory_release) logger.debug("Test Only is: '%s'" % test_only) + logger.debug("Sub dir is: '%s'" % subdir) ''' Copy the box to artifactory. This will most likely change to Atlas, or maybe both. @@ -157,9 +161,9 @@ def main(argv): "E.g.: export 'ARTIFACTORY_LOCATION_SNAPSHOT=http://location', or: \n" "E.g.: export 'ARTIFACTORY_LOCATION_RELEASE=http://location'") - box_out = os.path.join(location, boxname) + box_out = os.path.join(location, subdir, boxname) generate_hash(input_box) - hash_out = os.path.join(location, os.path.basename(hash_file)) + hash_out = os.path.join(location, subdir, os.path.basename(hash_file)) if test_only is True: logger.debug('Test only: copying %s to %s' % (input_box, box_out)) diff --git a/vagrantfiles/simple-mixed-topo/Vagrantfile b/vagrantfiles/simple-mixed-topo/Vagrantfile index d93dc17..5197221 100644 --- a/vagrantfiles/simple-mixed-topo/Vagrantfile +++ b/vagrantfiles/simple-mixed-topo/Vagrantfile @@ -10,9 +10,9 @@ Vagrant.configure(2) do |config| # Forward a port for grpc server access from the host, for eg. port 57777 configured on XR, forwarded to 57778 on host node.vm.network :forwarded_port, guest: 57777, host: 57778, id: "grpc", auto_correct: true - # gig0/0/0/0 connected to link2, gig00/0/1 connected to link1, gig0/0/0/2 connected to link3, auto-config not supported. - node.vm.network :private_network, virtualbox__intnet: "link2", auto_config: false + # gig0/0/0/0 connected to link1, gig00/0/1 connected to link2, gig0/0/0/2 connected to link3, auto-config not supported. node.vm.network :private_network, virtualbox__intnet: "link1", auto_config: false + node.vm.network :private_network, virtualbox__intnet: "link2", auto_config: false node.vm.network :private_network, virtualbox__intnet: "link3", auto_config: false end @@ -20,9 +20,9 @@ Vagrant.configure(2) do |config| config.vm.define "rtr2" do |node| node.vm.box = "IOS XRv" - # gig0/0/0/0 connected to link1, gig0/0/0/1 connected to link3, auto-config not supported + # gig0/0/0/0 connected to link1, gig0/0/0/1 connected to link2, auto-config not supported node.vm.network :private_network, virtualbox__intnet: "link1", auto_config: false - node.vm.network :private_network, virtualbox__intnet: "link3", auto_config: false + node.vm.network :private_network, virtualbox__intnet: "link2", auto_config: false node.vm.provider "virtualbox" do |v| # Optional, forward the XR console serial port a TCP port on the host @@ -32,12 +32,10 @@ Vagrant.configure(2) do |config| end end - config.vm.define "devbox" do |node| node.vm.box = "ubuntu/trusty64" # eth1 connected to link2, auto_config is supported for an ubuntu instance node.vm.network :private_network, virtualbox__intnet: "link2", ip: "11.1.1.2" - end end