#!/usr/bin/env python3
# Copyright (c) 2016 Arista Networks, Inc.  All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.

import Tac, Cell

scdEm = Tac.newInstance( "ScdEm::ScdEmInfo", "rebootOtherSup",
                         int( Cell.cellId() ), False )
ScdEmPeerStateConfig = Tac.Type( "ScdEm::PeerStateConfig" )

# Power cycle peer supervisor using the SCD redundancy register
scdEm.peerStateConfigIs( ScdEmPeerStateConfig.powerOff )
Tac.runActivities( 0.100 )
scdEm.peerStateConfigIs( ScdEmPeerStateConfig.powerOn )
