take an --api-url option to agent executables

This commit is contained in:
Russell Haering 2014-01-06 12:56:27 -08:00
parent 4b5b49850f
commit 20e530aab6
2 changed files with 24 additions and 2 deletions
teeth_agent/cmd

@ -14,8 +14,19 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import argparse
from teeth_agent import decom
def run():
decom.DecomAgent('0.0.0.0', 9999).run()
parser = argparse.ArgumentParser(
description='Run the teeth-agent in decom mode')
parser.add_argument('--api-url',
required=True,
help='URL of the Teeth agent API')
args = parser.parse_args()
decom.DecomAgent('0.0.0.0', 9999, args.api_url).run()

@ -14,8 +14,19 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import argparse
from teeth_agent import standby
def run():
standby.StandbyAgent('0.0.0.0', 9999).run()
parser = argparse.ArgumentParser(
description='Run the teeth-agent in standby mode')
parser.add_argument('--api-url',
required=True,
help='URL of the Teeth agent API')
args = parser.parse_args()
standby.StandbyAgent('0.0.0.0', 9999, args.api_url).run()