# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2011 Cisco Systems, Inc. All rights reserved.
#
# 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: Edgar Magana, Cisco Systems, Inc.
"""
Nexus-OS XML-based configuration snippets
"""
import logging
LOG = logging.getLogger(__name__)
# The following are standard strings, messages used to communicate with Nexus,
EXEC_CONF_SNIPPET = """
<__XML__MODE__exec_configure>%s
"""
CMD_VLAN_CONF_SNIPPET = """
<__XML__PARAM_value>%s
<__XML__MODE_vlan>
%s
active
"""
CMD_NO_VLAN_CONF_SNIPPET = """
<__XML__PARAM_value>%s
"""
CMD_VLAN_INT_SNIPPET = """
%s
<__XML__MODE_if-ethernet-switch>
<__XML__BLK_Cmd_switchport_trunk_allowed_allow-vlans>
%s
"""
CMD_PORT_TRUNK = """
%s
<__XML__MODE_if-ethernet-switch>
"""
CMD_NO_SWITCHPORT = """
%s
<__XML__MODE_if-ethernet-switch>
"""
CMD_NO_VLAN_INT_SNIPPET = """
%s
<__XML__MODE_if-ethernet-switch>
%s
"""
FILTER_SHOW_VLAN_BRIEF_SNIPPET = """
"""