Subscribe

ManageOntap.dll vs netapp-manage.dll

With the ManageOntap.dll I am able to create a qtree with the following code:

			NaServer s = new NaServer(Configuration["Host"], 1, 7) {
				Style = NaServer.AUTH_STYLE.LOGIN_PASSWORD
			};
			s.SetAdminUser(Configuration["Username"], Configuration["Password"]);
			s.SetVfilerTunneling("some-svm-name");
			NaElement c = new NaElement("qtree-create");
			c.AddNewChild("volume", "volume_name");
			c.AddNewChild("qtree", "some_folder_name");
			c.AddNewChild("security-style", "ntfs");
			c.AddNewChild("oplocks", "enabled");
			NaElement r = s.InvokeElem(c);

How can I achieve the same functionality with the netapp-manage.dll?

 

The closest I get is:

			QtreeCreate create = new QtreeCreate();
			create.Volume = "volume_name";
			create.Qtree = "some_folder_name";
			create.SecurityStyle = "ntfs";
			create.Oplocks = "enabled";

			var server = new NaFiler(Configuration["Host"]) {
				Credentials = new NetworkCredential(Configuration["Username"], Configuration["Password"])
			};
			
			QtreeCreateResult res = create.Invoke(server);

 , however I can't find a way to specify the vfiler.