Software Development Kit (SDK) and API Discussions

cant connect to DFM 6.3rc1 using SDK 5.4 c#

stephen2

All, unable to connect to DFM. Have tried 2 DFM servers, admin user, database user. Connection fails.

Anyone know what I am doing wrong? Code sample below:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NetApp.Manage;

namespace NetApp.NMSDK.Example
{
    class ApiClient
    {
        static void Main(string[] args)
        {
            try
            {
                NaServer s = new NaServer("10.97.94.50", 1, 0);
                s.ServerType = NaServer.SERVER_TYPE.DFM;
                s.TransportType = NaServer.TRANSPORT_TYPE.HTTPS;
                s.Port = 8488;
                s.Style = NaServer.AUTH_STYLE.LOGIN_PASSWORD;
                s.SetAdminUser("admin", "admin123");


                NaElement api = new NaElement("cluster-iter");
                api.AddNewChild("max-records", "20");
                api.AddNewChild("resource-filter", "<resource-filter>");
                api.AddNewChild("tag", "<tag>");

                NaElement xo = s.InvokeElem(api);
                Console.WriteLine(xo.ToPrettyString(""));


            }
            catch (NaAuthException e)
            {
                Console.Error.WriteLine("Authorization Failed: " + e.Message);
            }
            catch (NaApiFailedException e)
            {
                Console.Error.WriteLine("API FAILED: " + e.Message);
            }
            catch (Exception e)
            {
                Console.Error.WriteLine(e.Message);
            }
        }
    }
}

3 REPLIES 3

Navtej

Use port number 443

stephen2
I tried using 443 - I was just also trying port 80 to see if it made a difference

John_Roden

I have been connecting via perl pretty successfully... here is what I set when connecting OCUM.

 

my $s = new NaServer($server, 1 , 0);

$s->set_server_type('OCUM');

$s->set_transport_type('HTTPS');

$s->set_port(443);

 

I had issues in the beginning and played around with set_hostname_verification and got it to work, but I pulled that out recently and everything works fine.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public