Unsolved
This post is more than 5 years old
11 Posts
0
3103
celerra or vnx-file xml api login example
Hi All,
I am trying to use the celerra xml api to query the system and get some information. As per the help guide I first need to perform the http login and then use the cookie for all the next xml quires. But I am unable to make the login, the help guide is not at all descriptive enough for me.
The error I am getting is "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel" when tried from my c# program. Also I tried to use HttpRequester & Poster firefox tools to login, I am getting "403 Forbidden. Session timeout. Relogin and try this operation again." error here.
So can anyone help here please.
Regards,
Abhilash.
Rainer_EMC
8.6K Posts
0
January 13th, 2016 06:00
Hi,
do you still have a problem there ?
abhilas945
11 Posts
1
January 19th, 2016 21:00
Hi,
Yes, I am still unable to find a way to use this API. I am doing an working around by using SSH, but still the API is the best way for my application.
Any help here would be very useful to me.
Regards,
Abhilash.
MaBerY
3 Posts
0
January 20th, 2016 05:00
I got the example code working posted in https://community.emc.com/message/921930#921930 written by john mcgeever.
Most of the code is well written and understandable, but I have some problems interpret the Class defenitions for the responsePacket object. I was not able to iterate trough the object items.
I was able to serialize it back to a text string usung the Xml serializer:
System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(responsePacket.GetType());
x.Serialize(Console.Out, responsePacket);
I could not figure out how to map it to the defined FileSystemQueryParams class.
Has anyone have a clue how to interpret the resonse object
Rainer_EMC
8.6K Posts
0
January 21st, 2016 06:00
below is the schema definition of the responsePacket - does that help ?
Rainer
----
http://www.emc.com/schemas/celerra/xml_api "
elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:meta="http://www.emc.com/schemas/celerra/xml_api_meta"
xmlns:api="http://www.emc.com/schemas/celerra/xml_api">
Specifies an object that is a response to the corresponding request object from the request packet.
Defines an optional string that is an exact copy of the attribute 'clientHandle' of
the corresponding request structure. If the request object did not have the 'clientHandle'
attribute, this attribute does not occur.
Specifies an object that is a response to the corresponding request object from the request packet.
Defines an optional string that is an exact copy of the attribute 'clientHandle' of
the corresponding request structure. If the request object did not have the 'clientHandle'
attribute, this attribute does not occur.
Defines a response packet that is a top-level element of the XML contained in the body of the
HTTP POST reply.
Defines a response element that corresponds to the appropriate request element
in the request packet.
Defines the an extended response element that corresponds to the
appropraite extended request element.
Defines a fault that can not be attributed to any request, but is related more to
to the entire packet. For example, the message that was supposed to be a
request packet could not be parsed according to XML or defined schema rules.
Specifies the API version of the response packet.
Specifies the time on the Control Station at the moment when
it generated the reply.
This attribute is present only when the request packet
contains no requests (empty packet). By measuring the roundtrip
time of an empty packet and using the value of this attribute,
the user application can determine the time on
the Control Station server with a relatively good precision.
shivadaimler
24 Posts
0
March 29th, 2016 02:00
Hi Rainer,
I have a query i need one API CifsShareQueryParams to be used to query , my question how should i use this below schema or should i import to VNX? how can i achieve this,
http://www.w3.org/2001/XMLSchema " name="CifsShareQueryParams">
Defines parameters for the query that retrieves CIFS share objects.
Specifies a mover or a VDM.
If this element occurs, filter out shares that reside
on this mover or VDM.
Specifies a CIFS server NETBIOS name. If not specified, all shares
for the specified mover or VDM are retrieved.
Specifies a share name. If not specified, all shares on the specified mover/CIFS server
are retrieved.
Rainer_EMC
8.6K Posts
0
April 5th, 2016 07:00
the Schema is merely a help (documentation) for programmers to understand the namespace and syntax of the API
There is NO NEED to install it on the VNX.
cking220011
1 Rookie
1 Rookie
•
7 Posts
0
April 27th, 2016 09:00
Not sure if you need more and I hate to beat a dead horse. I have a bunch of scripts to find shares, get qtrees and quota usage and raise quotas, create qtrees and shares, etc. Once you get past the first step this all is very useful an do-able.
Here is an old sample I posted a while back using PowerShell. I did try similar with C# while debugging in my early efforts but don't have that code and don't recall what I used to do the http posts/etc.
This might need some fleshing out but it works. One thing I do have to do is import the certificate (to computer account store) as we have a self-signed certificate.
It is basically how I do things today though I we now use LDAP. I have some code for that if needed.
get-nas-cifs-share.ps1
Rainer_EMC
8.6K Posts
0
April 27th, 2016 10:00
Hi Chris,
always good to have examples posted.
Keep in mind though that the original post was about the VMX API and not Powershell.
Rainer
cking220011
1 Rookie
1 Rookie
•
7 Posts
0
April 27th, 2016 12:00
I guess I don't understand. I think he is asking about using the xml api which I am calling via PowerShell.
Frankly, I think he is trying to do exactly what I do though he might not be trying via PowerShell.(sounds like C#)
-c
Rainer_EMC
8.6K Posts
0
April 28th, 2016 15:00
Sorry – I didnt realize your PowerShell uses the XML API
I mixed it up with some other PowerShell commandlets that I have seen that use different ways