#!/usr/bin/env python

'''
 2017 wookieware.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


__author__ = "@netwookie"
__copyright__ = "Copyright 2017, wookieware."
__credits__ = ["Rick Kauffman"]
__license__ = "Apache2"
__version__ = "1.0.0"
__maintainer__ = "Rick Kauffman"
__email__ = "rick@rickkauffman.com"
__status__ = "Prototype"

Scripts sends full comware config to comware switch(es)
----------------------------------------------------------------------------------------------------
'''
from pyhpecommand.comware import HPCOM7
from pyhpecommand.features.config import Config
from pyhpecommand.features.booter import Booter
import subprocess
import thread

# python dict for coneecting to device
args = dict(host='192.168.19.130', username='admin', password='admin')

# Connect to device
device = HPCOM7(**args)
device.open()


# Create config class
fig = Booter(device)
# Build config
fig.bootbuild(stage=True)
