1845484 Members
3147 Online
110244 Solutions
New Discussion

VCEMCLI

 
TonyFlora63
New Member

VCEMCLI

HI

 

Does anyone know of a way to query specific server profiles to retrieve what VLANS are assigned to the ports?

 

I am fairly new to using the VCEM command line utility so maybe I'm not understanding the command syntax to accomplish this.

 

Regards,

 

Tony

1 REPLY 1
el pinco
Occasional Advisor

Re: VCEMCLI

Hi Tony,

 

from what I understood with vcemcli you can mainly perform changes to the profiles.

To query info, you should access via ssh to the modules, and then play with grep and similar.

The key command is "show server-port-map <profile_name>:<nic_number>".

 

This is something I did a few days ago:

 

#!/bin/bash

TARGET="$1"
PROFILE="$2"

if [ -z "$PROFILE" ] ; then
  echo "Syntax: $0 <vconnect-module> <profile>"
  exit 1
fi

for k in 1 2 3 4 5 6 ; do
  VLAN=$(ssh -l admin "$TARGET" show server-port-map "$PROFILE:$k" |
                                grep -e ' -- -- ' | tr -s ' ' | cut -f 2 -d' '| sort -n )
  VLAN=$(echo $VLAN)
  echo "Port $k: $VLAN"
done

 

Redards from Italy,