Forum Discussion

murataydin_1412's avatar
murataydin_1412
Icon for Nimbostratus rankNimbostratus
Jan 15, 2014

Downloading external data group file in v11.2.1

Hi, Im trying to download an external data file with icontrol SystemConfigSync.download_file function in v11.2.1 HF2. I get error even when the filepath and file name is true and the file has necessary permissions for read&write operations. Below is the code with some comments. I can explain further if needed. Thanks for any help.

 

iControl.SystemConfigSyncFileTransferContext FTC;
 long size_data_dl = 30;
 long offset = 0;
 string[] Class_File_Name;
 string[] Path2;
 string[] class_name = {"dsb1garc"};
 bool result = my_interface.initialize("IP", "AdminUser", "password");
 my_interface.ManagementPartition.set_active_partition("Common");
 Class_File_Name = my_interface.LocalLBClass.get_external_class_file_name_v2(class_name);
 Path2 = my_interface.LocalLBDataGroupFile.get_cache_path(Class_File_Name);
 /* first one here is Class_File_Name[0] = "/Common/dsb1garc"( i checked it with debug) */
 //FTC = my_interface.SystemConfigSync.download_file(Class_File_Name[0], size_data_dl, ref offset);
 /* second one here is Path2[0] = "/config/filestore/files_d/Common_d/data_group_d/:Common:dsb1garc_1" ( i checked it with debug) */
  FTC = my_interface.SystemConfigSync.download_file(Path2[0], size_data_dl, ref offset

Both versions get exceptions. First one gets "Error opening file for read operation and Second one gets invalid argument exception.

 

2 Replies

  • Hi We are facing a very similar issue. Any suggestions on how to download a file which is in a partition? Thanks in advance!
  • Hi, you can use this workaround which is the answer to my case about this problem: "The only workaround here could be to copy/rename the data-group files to a different location regularly (cron job). You can then use that location to download the file / Modify. Upload the file with a new name and reload the data-group."