Skip to content

IDEA: allow for unkown args #4

@gkspranger

Description

@gkspranger

i might be going about this wrong, but i want to create a reusable "provisioner" strider.py file .. be more DRY .. but this means i need to be able to pass it arguments .. such as "--role" or whatever .. so i went ahead and added this code to the top of my strider.py file ..

import argparse
parser = argparse.ArgumentParser(description='create, provision, bake')
parser.add_argument('--role', help='web', required=True)
ddargs, ddleftovers = parser.parse_known_args()

but as you can imagine, strider gets mad at me and says:

[yoyoma@air ~/git/dumbodata]$python strider_web.py --role web --up
EC2: EBS property: size => 10
EC2: EBS property: volume_type => gp2
EC2: EBS property: size => 10
EC2: EBS property: volume_type => gp2
EC2: connecting...
EC2: connected
usage: strider_web.py [-h] [--up] [--provision] [--ssh] [--destroy] [--bake]
                      [--auto-teardown]
strider_web.py: error: unrecognized arguments: --role web

so i was hoping you all might be willing to allow unknown args to be passed in ?? not the most awesome python guy here -- but it does seem related to: https://github.com/jcftang/strider/blob/master/lib/strider/__init__.py

line 89

thoughts ?? and thanks for maintaining this .. it's so dang convenient vs having to do the packer/vagrant dance ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions