On 12-Mar-15 4:51 PM, Hans Nordebäck wrote: > Ack, code review only, some comments, ng usage is missing in the usage > function. The ng_state is called with $STATE and $DN, only $DN is used in > ng_state(), not $DN. > I will make the changes before pushing.
Thanks, Praveen > /Thanks HansN > > -----Original Message----- > From: praveen.malv...@oracle.com [mailto:praveen.malv...@oracle.com] > Sent: den 2 mars 2015 14:35 > To: Hans Nordebäck; nagendr...@oracle.com; Bertil Engelholm; > mathi.naic...@oracle.com > Cc: opensaf-devel@lists.sourceforge.net > Subject: [PATCH 7 of 7] amfd: show nodegroups and their admin state in > amf-state command [#1235] > > osaf/tools/scripts/amf-state | 27 +++++++++++++++++++++++++++ > 1 files changed, 27 insertions(+), 0 deletions(-) > > > amf-state ng > safAmfNodeGroup=AllNodes,safAmfCluster=myAmfCluster > saAmfNGAdminState=UNLOCKED(1) > safAmfNodeGroup=PLs,safAmfCluster=myAmfCluster > saAmfNGAdminState=UNLOCKED(1) > safAmfNodeGroup=SCs,safAmfCluster=myAmfCluster > saAmfNGAdminState=UNLOCKED(1) > safAmfNodeGroup=TestNG,safAmfCluster=myAmfCluster > saAmfNGAdminState=LOCKED(2) > > diff --git a/osaf/tools/scripts/amf-state b/osaf/tools/scripts/amf-state > --- a/osaf/tools/scripts/amf-state > +++ b/osaf/tools/scripts/amf-state > @@ -546,6 +546,30 @@ su_state() > done > } > > +ng_state() > +{ > + ng_dn="" > + ng_dns="" > + ng_state="" > + ng_states="" > + > + ng_states="saAmfNGAdminState" > + > + if [ "$2" = "all" ]; then > + ng_dns=`immfind -c SaAmfNodeGroup` > + else > + ng_dns=$2 > + fi > + > + for ng_dn in $ng_dns; do > + echo "$ng_dn" > + for ng_state in $ng_states; do > + if [ "$ng_state" = "saAmfNGAdminState" ]; then > + adm_state $ng_state $ng_dn > + fi > + done > + done > +} > case "$CLASS" in > app) > app_state $STATE $DN > @@ -571,6 +595,9 @@ case "$CLASS" in > su) > su_state $STATE $DN > ;; > + ng) > + ng_state $STATE $DN > + ;; > *) > usage > exit 1 > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel