Management Software

Reply
Contributor
Posts: 53
Registered: ‎06-24-2009

Problems compiling example with SMI-Agent for FOS

Hello,

I need to use the SMI Agent for FOS to rewrite my script that was written using the brocade API in Perl since this is no longer supported. I am a member of the Brocade Developer Program and downloaded version 120.10.0 of the SMI Agent, i.e. the development kit.

Unfortunately there are no example programs in the package. I therefore tried to use the first example from the Developer's Guide. When trying to compile the java, it complains that the classes CIMClient, CIMValue and CIMException don't exist.

I have gone through all the jar files in the packages and, indeed, they are not there.

If CIMClient is not the class you should use to open communication from the client to agent, could someone please tell what is? And what classes should be used to replace the other two that are not in the package?

Thank you in advance,

Alastair

External Moderator
Posts: 5,034
Registered: ‎02-23-2004

Re: Problems compiling example with SMI-Agent for FOS

--->>> If CIMClient is not the class you should use to open communication from the client to agent, could someone please tell what is?

From developers Guide.

Connection to a fabric is one per SMI Agent (not one per CIM client). If the SMI Agent is already

connected to the fabric, then all CIM clients trying to get information from that fabric use the

already established connection with the same privileges as the SMI Agent if no user-mapping

entries are present. If the user-mapping entries

are present, then the CIM client will get the

information based on the user-mapping.







TechHelp24
Contributor
Posts: 53
Registered: ‎06-24-2009

Re: Problems compiling example with SMI-Agent for FOS

Thank you for the reply.

However, the citation you give refers to the connection between the agent and the fabric. I don't get anywhere near that far as I cannot make the initial connection between the client (my program) and the agent.

In all the examples in the Developers Guide, there is a call to CIMClient:

     obj = new CIMClient(...);

This is always the first real action made by the program. This CIM method is called either in the local method "startCimomSession" or in the local constructor. Note that these latter two methods are related to the examples themselves and not the API provided in the package.

So my question remains.

If anyone could provide a skeletal program that compiles, that would be fantastic.

Thanks,

Alastair

External Moderator
Posts: 5,034
Registered: ‎02-23-2004

Re: Problems compiling example with SMI-Agent for FOS

--->>>....CIMClient, CIMValue and CIMException don't exist.

--->>>So my question remains.

And here you have your next Official statement.

"Sample code for CIMClient, CIMValue and CIMException are listed in the Developer Guide."

And Thank you very much for Rating the Thread's

TechHelp24
Contributor
Posts: 53
Registered: ‎06-24-2009

Re: Problems compiling example with SMI-Agent for FOS

You seem to have misunderstood. As I said in my original post:

"I therefore tried to use the first example from the Developer's Guide. When trying to compile the java, it complains that the classes CIMClient, CIMValue and CIMException don't exist."

You are saying the examples in the Devloper's Guide are provided as samples of code. I am saying they don't compile.

Every example calls CIMClient as one of the first actions. The following program does not compile because CIMClient is not defined!

import java.util.*;
import javax.cim.*;
// import javax.wbem.cim.*;
import javax.wbem.client.*;

public class t {
        public static void main(String[] args) {
                CIMClient client = null;
        }
}

Note that I commented out javax.wbem.cim because that is not how it is defined in wbem.jar. If I don't comment it out, the compiler also compains of its non-existence.

I tried compiling the above with the command "javac -cp ~/agent/liv/wbem.jar t.java" where "~" is the directory where I installed the SMI-A package. The output is:

t.java:8: cannot find symbol
symbol  : class CIMClient
location: class t
                CIMClient client = null;
                ^
1 error

I repeat that CIMClient is not defined in any other of the jar files in the package.

External Moderator
Posts: 5,034
Registered: ‎02-23-2004

Re: Problems compiling example with SMI-Agent for FOS

adamson,

I'm too stupid for all these java compilation games, I can only say what I got as a response, and from whom did get it, can assume that it is 101% correct.

But if you mean i have "misunderstood" your question, please ask you self by the Developer Team.

--->>>I am a member of the Brocade Developer Program....

.....your are a member from Developer Program, I do not.

I'm sorry, but I have no other tip for you.



TechHelp24
Contributor
Posts: 53
Registered: ‎06-24-2009

Re: Problems compiling example with SMI-Agent for FOS

I tried to get an answer from the SMIA Devopment Team, I sent them a mail a week ago. From the email read receipts, I know at least seven people have opened my mail and another seven deleted the mail without opening it.

However, I have had no reply whatsoever so the Development Team would not appear to be a better source of information than this forum.

I can only guess no one uses this API and Brocade does not wish it to be used.

Alastair

External Moderator
Posts: 5,034
Registered: ‎02-23-2004

Re: Problems compiling example with SMI-Agent for FOS

I have just forward to a Brocade employ by e-Mail.

when i get answer, i will post here.

TechHelp24

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

vADC is now Pulse Secure
Download FREE NVMe eBook