Repository: irods/irods_client_icommands
Pull request #571: before irods5 touchups (main)
Author: login: trel
Created: 2025-05-08T21:39:58Z | Merged: 2025-05-12T22:01:16Z

will create/add issue numbers once we get some eyeballs on the scope


Diff:
diff --git a/src/iadmin.cpp b/src/iadmin.cpp
index 6f86060..0beada6 100644
--- a/src/iadmin.cpp
+++ b/src/iadmin.cpp
@@ -387,7 +387,7 @@ auto modify_replica(
                     return 0 == attr.compare(a.first);
                 });
             const auto attr_in_genquery_attrs_and_not_in_denylist{
-                std::cend(genquery_attrs) != attr_pair && 
+                std::cend(genquery_attrs) != attr_pair &&
                 std::none_of(
                     std::cbegin(genquery_attrs_denylist),
                     std::cend(genquery_attrs_denylist),
@@ -452,75 +452,6 @@ auto modify_replica(
     return 0;
 } // modify_replica
 
-auto ls_replica(
-    char** tokens) -> int
-{
-    try {
-        const auto args = get_args_vector(tokens, 5);
-        std::stringstream q_str;
-        q_str << "select";
-        for (auto c = std::begin(genquery_attrs); c != std::end(genquery_attrs); ++c) {
-            q_str << " " << c->first;
-            if (std::next(c) != std::end(genquery_attrs)) {
-                q_str << ",";
-            }
-        }
-
-        const auto data_object_option = get_data_object_value(args[1], args[2]);
-        if (const auto id = std::get_if<data_id_t>(&data_object_option)) {
-            q_str << " where DATA_ID = '" << *id << "'";
-        }
-        else if (const auto path = std::get_if<logical_path_t>(&data_object_option)) {
-            const auto dirname = path->parent_path().string();
-            q_str << " where COLL_NAME = '" << dirname << "'";
-            const auto basename = path->object_name().string();
-            q_str << " and DATA_NAME = '" << basename << "'";
-        }
-        else {
-            std::cerr << "Invalid data object option specified." << std::endl;
-            return -2;
-        }
-
-        const auto replica_option = get_replica_value(args[3], args[4]);
-        if (const auto num = std::get_if<replica_number_t>(&replica_option)) {
-            q_str << " and DATA_REPL_NUM = '" << *num << "'";
-        }
-        else if (const auto hier = std::get_if<resource_hierarchy_t>(&replica_option)) {
-            q_str << " and DATA_RESC_HIER = '" << *hier << "'";
-        }
-        else {
-            std::cerr << "Invalid replica option specified." << std::endl;
-            return -2;
-        }
-
-        if (veryVerbose) {
-            std::cout << "query:[" << q_str.str() << "]" << std::endl;
-        }
-
-        auto q = irods::experimental::query_builder{}
-            .zone_hint(Conn->clientUser.rodsZone)
-            .build<rcComm_t>(*Conn, q_str.str());
-
-        if (std::begin(q) == std::end(q)) {
-            std::cout << "No results found." << std::endl;
-            return -3;
-        }
-
-        size_t index = 0;
-        for (auto&& result : q) {
-            for (auto&& r : result) {
-                std::cout << genquery_attrs[index++].first << ": ";
-                std::cout << r << std::endl;
-            }
-        }
-    }
-    catch (const std::exception& e) {
-        std::cerr << "An error occurred:\n" << e.what() << std::endl;
-        return -2;
-    }
-    return 0;
-} // ls_replica
-
 constexpr auto is_timestamp_label(std::string_view _label) -> bool
 {
     constexpr std::array timestamp_labels{"create_ts", "modify_ts"};
@@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
     if ( strcmp( cmdToken[0], "lz" ) == 0 ) {
         show_zone(cmdToken[1]);
         return 0;
@@ -1437,24 +1364,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_global_quotas(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "mkdir" ) == 0 ) {
-        if ( _rodsArgs->force == True ) {
-            int path_index = 1;
-#ifdef osx_platform
-            path_index = 2;
-#endif
-            generalAdmin( 0, "add", "dir",
-                          cmdToken[path_index], "",
-                          "", "",
-                          "", "",
-                          "", "" );
-        }
-        else {
-            usage( "mkdir" );
-        }
-
-        return 0;
-    }
 
     if ( strcmp( cmdToken[0], "mkresc" ) == 0 ) {
         // trim spaces in resource type string
@@ -1672,11 +1581,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         generalAdmin( 0, "rm", "resource", cmdToken[1], cmdToken[2], cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "", _rodsArgs );
         return 0;
     }
-    if ( strcmp( cmdToken[0], "rmdir" ) == 0 ) {
-        generalAdmin( 0, "rm", "dir", cmdToken[1], cmdToken[2],
-                      cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "" );
-        return 0;
-    }
     if ( strcmp( cmdToken[0], "rmuser" ) == 0 ) {
         generalAdmin( 0, "rm", "user", cmdToken[1],
                       cmdToken[2], cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "" );
@@ -1720,27 +1624,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         }
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ctime" ) == 0 ) {
-        char myString[TIME_LEN];
-        if ( strcmp( cmdToken[1], "str" ) == 0 ) {
-            int status;
-            status = checkDateFormat( cmdToken[2] );
-            if ( status ) {
-                rodsLogError( LOG_ERROR, status, "ctime str:checkDateFormat error" );
-            }
-            printf( "Converted to local iRODS integer time: %s\n", cmdToken[2] );
-            return 0;
-        }
-        if ( strcmp( cmdToken[1], "now" ) == 0 ) {
-            char nowString[100];
-            getNowStr( nowString );
-            printf( "Current time as iRODS integer time: %s\n", nowString );
-            return 0;
-        }
-        getLocalTimeFromRodsTime( cmdToken[1], myString );
-        printf( "Converted to local time: %s\n", myString );
-        return 0;
-    }
     if ( strcmp( cmdToken[0], "rum" ) == 0 ) {
         int status;
         status = generalAdmin( 0, "rm", "unusedAVUs", "", "",
@@ -1825,20 +1708,6 @@ main( int argc, char **argv ) {
     rodsArguments_t myRodsArgs;
     int status = parseCmdLineOpt( argc, argv, "fvVhZ", 1, &myRodsArgs );
 
-#ifdef osx_platform
-    // getopt has different behavior on OSX, we work around this for
-    // the one specific instance where mkdir is use with a force flag
-    // this will be refactored in the future to use the boost::program_options
-    // to remove the need for this gratuitous hack
-    if ( argc > 2 ) {
-        std::string sub_cmd   = argv[1];
-        std::string force_flg = argv[2];
-        if ( "mkdir" == sub_cmd && "-f" == force_flg ) {
-            myRodsArgs.force = True;
-        }
-    } // if argc
-#endif
-
     if ( status ) {
         fprintf( stderr, "Use -h for help.\n" );
         return 2;
@@ -1921,30 +1790,6 @@ main( int argc, char **argv ) {
         return 1;
     }
 
-    if ( strcmp( cmdToken[0], "ctime" ) == 0 ) {
-        char myString[TIME_LEN];
-        if ( strcmp( cmdToken[1], "str" ) == 0 ) {
-            int status;
-            status = checkDateFormat( cmdToken[2] );
-            if ( status ) {
-                rodsLogError( LOG_ERROR, status, "ctime str:checkDateFormat error" );
-            }
-            printf( "Converted to local iRODS integer time: %s\n", cmdToken[2] );
-            return 0;
-        }
-        if ( strcmp( cmdToken[1], "now" ) == 0 ) {
-            char nowString[100];
-            getNowStr( nowString );
-            printf( "Current time as iRODS integer time: %s\n", nowString );
-            return 0;
-        }
-        getLocalTimeFromRodsTime( cmdToken[1], myString );
-        printf( "Converted to local time: %s\n", myString );
-        return 0;
-    }
-
-    /* need to copy time convert commands up here too */
-
     // =-=-=-=-=-=-=-
     // initialize pluggable api table
     irods::pack_entry_table& pk_tbl  = irods::get_pack_table();
@@ -2058,7 +1903,6 @@ void usageMain() {
         " luan Name (list users associated with auth name (GSI/Kerberos)",
         " lt [name] [subname] (list token info)",
         " lr [name] (list resource info)",
-        " ls [logical_path <string>|data_id <int>] [replica_number <int>|resource_hierarchy <string>] (list replica info)",
         " lz [name] (list zone info)",
         " lg [name] (list group info (user member list))",
         " lgd name  (list group details)",
@@ -2068,7 +1912,6 @@ void usageMain() {
         " rua Name[#Zone] Auth-Name (remove user authentication name (GSI/Kerberos)",
         " rpp Name  (remove PAM-derived Password for user Name)",
         " rmuser Name[#Zone] (remove user, where userName: name[@department][#zone])",
-        " rmdir Name (remove directory) ",
         " mkresc Name Type [Host:Path] [ContextString] (make Resource)",
         " modresc Name [name, type, host, path, status, comment, info, free_space, context, rebalance] Value (mod Resc)",
         " modrescdatapaths Name oldpath newpath [user] (update data-object paths,",
@@ -2088,7 +1931,6 @@ void usageMain() {
         " rt tokenNamespace Name [Value1] (remove token) ",
         " spass Password Key (print a scrambled form of a password for DB)",
         " dspass Password Key (descramble a password and print it)",
-        " ctime Time (convert an iRODS time (integer) to local time; & other forms)",
         " suq User Target Value (set user quota)",
         " sgq Group Target Value (set group quota)",
         " lq [Name] List Quotas",
@@ -2167,18 +2009,6 @@ usage( char *subOpt ) {
         "If you include a resource name, it will list more detailed information.",
         ""
     };
-    char *lsMsgs[] = {
-        "ls [logical_path <string>|data_id <int>] [replica_number <int>|resource_hierarchy <string>] (list replica info)",
-        "List attributes of a replica in the catalog.",
-        " ",
-        "The logical_path must refer to a data object registered in the catalog.",
-        " ",
-        "The replica to modify must be specified. There are 2 options for doing so:",
-        "    1. replica_number - An integer representing the replica number",
-        "    2. resource - Resource hierarchy hosting the target replica",
-        " ",
-        ""
-    };
     char *lzMsgs[] = {
         " lz [name] (list zone info)",
         "Just 'lz' briefly lists the defined zone(s).",
@@ -2283,20 +2113,6 @@ usage( char *subOpt ) {
         ""
     };
 
-    char *mkdirMsgs[] = {
-        "***************************** WARNING ********************************",
-        "This command is intended for installation purposes and should never be",
-        "called directly by a user.  In order to make a collection please use",
-        "the 'imkdir' icommand.",
-        ""
-    };
-
-    char *rmdirMsgs[] = {
-        " rmdir Name (remove directory) ",
-        "This is similar to 'irm -f'.",
-        ""
-    };
-
     char *mkrescMsgs[] = {
         " mkresc Name Type [Host:Path] [ContextString] (make Resource)",
         "Create (register) a new coordinating or storage resource.",
@@ -2434,11 +2250,9 @@ usage( char *subOpt ) {
         "must previously exist and there can be only one local zone definition.",
         "Connection-info (hostname:port) and a Comment field are optional.",
         " ",
-        "The connection-info should be the hostname of the ICAT-Enabled-Server (IES)",
-        "of the zone.  If it is a non-IES, remote users trying to connect will get",
-        "a CAT_INVALID_USER error, even if valid, due to complications in the",
-        "way the protocol connections operate when the local server tries to",
-        "connect back to the remote zone to authenticate the user.",
+        "The connection-info should be the hostname of a Catalog Service Provider",
+        "of the zone.  If it is a Catalog Service Consumer, remote users trying to",
+        "connect will get a CAT_INVALID_USER error.",
         " ",
         "Also see modzone, rmzone, and lz.",
         ""
@@ -2449,8 +2263,8 @@ usage( char *subOpt ) {
         "Modify values in a zone definition, either the name, conn (connection-info),",
         "or comment.  Connection-info is the DNS host string:port, for example:",
         "irods.example.org:1247",
-        "When modifying the conn information, it should be the hostname of the",
-        "ICAT-Enabled-Server (IES); see 'h mkzone' for more.",
+        "When modifying the conn information, it should be the hostname of a",
+        "Catalog Service Provider; see 'h mkzone' for more.",
         " ",
         "The name of the local zone can be changed via some special processing and",
         "since it also requires some manual changes, iadmin will explain those and",
@@ -2554,24 +2368,6 @@ usage( char *subOpt ) {
         ""
     };
 
-    char *ctimeMsgs[] = {
-        " ctime Time (convert a iRODSTime value (integer) to local time",
-        "Time values (modify times, access times) are stored in the database",
-        "as a Unix Time value.  This is the number of seconds since 1970 and",
-        "is the same in all time zones (basically, Coordinated Universal Time).",
-        "ils and other utilities will convert it before displaying it, but iadmin",
-        "displays the actual value in the database.  You can enter the value to",
-        "the ctime command to convert it to your local time.  The following two",
-        "additional forms can also be used:",
-        " ",
-        " ctime now      - convert a current time to an iRODS time integer value.",
-        " ",
-        " ctime str Timestr  - convert a string of the format Timestr",
-        " (YYYY-MM-DD.hh:mm:ss) to an iRODS integer value time.",
-        " ",
-        ""
-    };
-
     char *suqMsgs[] = {
         " suq User Target Value (set user quota)",
         " ",
@@ -2804,8 +2600,6 @@ usage( char *subOpt ) {
                        "rua",
                        "rpp",
                        "rmuser",
-                       "mkdir",
-                       "rmdir",
                        "mkresc",
                        "modresc",
                        "modrescdatapaths",
@@ -2824,7 +2618,6 @@ usage( char *subOpt ) {
                        "rt",
                        "spass",
                        "dspass",
-                       "ctime",
                        "suq",
                        "sgq",
                        "lq",
@@ -2846,7 +2639,6 @@ usage( char *subOpt ) {
                       luzMsgs,
                       ltMsgs,
                       lrMsgs,
-                      lsMsgs,
                       lzMsgs,
                       lgMsgs,
                       lgdMsgs,
@@ -2856,8 +2648,6 @@ usage( char *subOpt ) {
                       ruaMsgs,
                       rppMsgs,
                       rmuserMsgs,
-                      mkdirMsgs,
-                      rmdirMsgs,
                       mkrescMsgs,
                       modrescMsgs,
                       modrescDataPathsMsgs,
@@ -2876,7 +2666,6 @@ usage( char *subOpt ) {
                       rtMsgs,
                       spassMsgs,
                       dspassMsgs,
-                      ctimeMsgs,
                       suqMsgs,
                       sgqMsgs,
                       lqMsgs,
diff --git a/src/icp.cpp b/src/icp.cpp
index 7153974..26a9e88 100644
--- a/src/icp.cpp
+++ b/src/icp.cpp
@@ -141,7 +141,7 @@ usage() {
         " -r recursive - copy the whole subtree",
         " -T  renew socket connection after 10 minutes",
         " -v verbose - display various messages while processing",
-        " -V very verbose",
+        " -V Very verbose",
         " -X restartFile - specifies that the restart option is on and the",
         "      restartFile input specifies a local file that contains the restart info.",
         " -h this help",
diff --git a/src/iexit.cpp b/src/iexit.cpp
index f1776a3..8a91954 100644
--- a/src/iexit.cpp
+++ b/src/iexit.cpp
@@ -105,7 +105,7 @@ void usage(char *prog) {
     std::printf("Usage: %s [-fvVh]\n", prog);
     std::printf(" -f  force removal of auth file\n");
     std::printf(" -v  verbose\n");
-    std::printf(" -V  very verbose\n");
+    std::printf(" -V  Very verbose\n");
     std::printf(" -h  this help\n");
     printReleaseInfo("iexit");
 }
diff --git a/src/ils.cpp b/src/ils.cpp
index 510c41e..e6fb4a0 100644
--- a/src/ils.cpp
+++ b/src/ils.cpp
@@ -133,11 +133,11 @@ usage() {
         "The long format (given by -l) will display some more information:",
         "    $ ils -l",
         "    /tempZone/public:",
-        "      rods              0 demoResc              41943040 2021-04-29.17:57 & big",
-        "      rods              2 comp;arch             40236581 2021-04-19.03:00 X big",
-        "      alice             2 repl1;child1               283 2021-04-29.17:54 ? foo",
-        "      alice             3 repl1;child2               283 2021-04-29.17:56 ? foo",
-        "      alice             4 repl1;child3               283 2021-04-29.17:57 ? foo",
+        "      rods              0 demoResc              41943040 2025-04-29.17:57 & big",
+        "      rods              2 comp;arch             40236581 2025-04-19.03:00 X big",
+        "      alice             2 repl1;child1               283 2025-04-29.17:54 ? foo",
+        "      alice             3 repl1;child2               283 2025-04-29.17:56 ? foo",
+        "      alice             4 repl1;child3               283 2025-04-29.17:57 ? foo",
         "This displays replica information and system metadata for the replicas of",
         "the data objects in the current working collection. This information includes",
         "the owner of the data object and the replica's number, resource hierarchy, size,",
@@ -147,15 +147,15 @@ usage() {
         " ",
         "    $ ils -L",
         "    /tempZone/public:",
-        "      rods              0 demoResc              41943040 2021-04-29.17:57 & big",
+        "      rods              0 demoResc              41943040 2025-04-29.17:57 & big",
         "        sha2:gKNyEYjkAhiwiyZ3a8U72ugeR4T/9x1xRQoZcxnLoRM=    generic    /var/lib/irods/Vault/public/big",
-        "      rods              2 comp;arch             40236581 2021-04-19.03:00 X big",
+        "      rods              2 comp;arch             40236581 2025-04-19.03:00 X big",
         "        sha2:KNyEYjkhiwyZ3a8U72ugeR4T/9x1xRQoZcxnLoRMigg=    generic    /var/lib/irods/archVault/public/big",
-        "      alice             2 repl1;child1               283 2021-04-29.17:54 ? foo",
+        "      alice             2 repl1;child1               283 2025-04-29.17:54 ? foo",
         "            generic    /var/lib/irods/child1vault/public/foo",
-        "      alice             3 repl1;child2               283 2021-04-29.17:56 ? foo",
+        "      alice             3 repl1;child2               283 2025-04-29.17:56 ? foo",
         "            generic    /var/lib/irods/child2vault/public/foo",
-        "      alice             4 repl1;child3               283 2021-04-29.17:57 ? foo",
+        "      alice             4 repl1;child3               283 2025-04-29.17:57 ? foo",
         "            generic    /var/lib/irods/child3vault/public/foo",
         "This displays even more replica information and system metadata such as each ",
         "replica's checksum, data type, and physical location in the storage resource.",
diff --git a/src/imv.cpp b/src/imv.cpp
index b19454c..b799fa3 100644
--- a/src/imv.cpp
+++ b/src/imv.cpp
@@ -116,7 +116,7 @@ usage( char *program ) {
         " ",
         "Options are:",
         "-v verbose - display various messages while processing",
-        "-V very verbose",
+        "-V Very verbose",
         "-h help - this help",
         ""
     };
diff --git a/src/ips.cpp b/src/ips.cpp
index 5def9e9..215ef1a 100644
--- a/src/ips.cpp
+++ b/src/ips.cpp
@@ -285,8 +285,8 @@ usage() {
         "Usage: ips [-ahv] [-R resource] [-z zone] [-H hostAddr]",
         " ",
         "Display connection information of iRODS agents currently running in",
-        "the iRODS federation. By default, agent info for the iCAT enabled server",
-        "(IES) is displayed.",
+        "the iRODS federation. By default, agent info for the Catalog Service",
+        "Provider is displayed.",
         " ",
         "The -H and -R option can be used to specify other servers for the",
         "info display. The -z option can be used to specify a remote zone for",
diff --git a/src/ipwd.cpp b/src/ipwd.cpp
index b4a5354..660d3fe 100644
--- a/src/ipwd.cpp
+++ b/src/ipwd.cpp
@@ -49,7 +49,7 @@ void usage( char *prog ) {
     std::cout << "Shows your iRODS Current Working Directory.\n"
               << "Usage: " << prog << " [-vVh]\n"
               << " -v  verbose\n"
-              << " -V  very verbose\n"
+              << " -V  Very verbose\n"
               << " -h  this help" << std::endl;
     printReleaseInfo( "ipwd" );
 }
diff --git a/src/irmdir.cpp b/src/irmdir.cpp
index c7ec261..b05b8e2 100644
--- a/src/irmdir.cpp
+++ b/src/irmdir.cpp
@@ -157,7 +157,7 @@ void usage( char *prog ) {
     printf( "     pathname of which all components will be removed, as\n" );
     printf( "     long as they are empty, starting with the lastmost.\n" );
     printf( " -v  verbose\n" );
-    printf( " -V  very verbose\n" );
+    printf( " -V  Very verbose\n" );
     printf( " -h  this help\n" );
     printReleaseInfo( "irmdir" );
 }
diff --git a/src/irmtrash.cpp b/src/irmtrash.cpp
index 52c7561..dd502b9 100644
--- a/src/irmtrash.cpp
+++ b/src/irmtrash.cpp
@@ -95,16 +95,16 @@ void
 usage() {
     char *msgs[] = {
         "Usage: irmtrash [-hMrvV] [--orphan] [-u user] [-z zoneName] [--age age_in_minutes] [dataObj|collection ...] ",
-        "Remove one or more data-object or collection from a RODS trash bin.",
+        "Remove one or more data-object or collection from an iRODS trash bin.",
         "If the input dataObj|collection is not specified, the entire trash bin",
-        "of the user (/$myZone/trash/$myUserName) will be removed.",
+        "of the user (/myZone/trash/myUserName) will be removed.",
         " ",
         "The dataObj|collection can be used to specify the paths of dataObj|collection",
         "in the trash bin to be deleted. If the path is relative (does not start",
         "with '/'), the path assumed to be relative to be the user's trash home path",
         "e.g., /myZone/trash/home/myUserName.",
         " ",
-        "An admin user can use the -M option to delete other users' trash bin.",
+        "An admin user can use the -M option to delete other users' trash bins.",
         "The -u option can be used by an admin user to delete the trash bin of",
         "a specific user. If the -u option is not used, the trash bins of all",
         "users will be deleted.",
diff --git a/src/isysmeta.cpp b/src/isysmeta.cpp
index 1fcd3ee..97a121a 100644
--- a/src/isysmeta.cpp
+++ b/src/isysmeta.cpp
@@ -494,7 +494,7 @@ usage() {
         " ls [-lvV] Name (list dataObject, -l -v for long form)",
         " ldt (list data types (those available))",
         " ",
-        "Time can be full or partial date/time: '2009-12-01' or '2009-12-11.12:03'",
+        "Time can be full or partial date/time: '2024-12-01' or '2024-12-11.12:03'",
         "etc, or a delta time '+1h' (one hour from now), etc.",
         " ",
         "Examples:",


Reviews:
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-08T21:40:25Z
user: login: alanking
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T12:20:38Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T12:51:19Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T12:52:13Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T12:53:16Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T12:53:30Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T13:16:34Z
user: login: alanking
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T13:30:25Z
user: login: alanking
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T13:34:27Z
user: login: korydraughn
body: Changes look good.
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-09T13:34:33Z
user: login: alanking
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T13:35:03Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T14:01:52Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T14:02:58Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T14:06:11Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T17:23:38Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T18:18:49Z
user: login: alanking
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T18:27:24Z
user: login: trel
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T18:31:26Z
user: login: alanking
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T21:34:05Z
user: login: alanking
body: I think this is good to go. If there's nothing else, let's # it.
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T21:44:44Z
user: login: korydraughn
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-12T21:49:13Z

Review comments:
diff_hunk: @@ -73,7 +73,6 @@ const attrs_t genquery_attrs = {
     {"DATA_ACCESS_TIME", DATA_ACCESS_TIME_KW},
     {"DATA_MODIFY_TIME", DATA_MODIFY_KW},
     {"DATA_COMMENTS", DATA_COMMENTS_KW},
-    //{"DATA_RESC_GROUP_NAME", DATA_RESC_GROUP_NAME_KW}, // missing from genquery since 4.2
path: src/iadmin.cpp
user: login: trel
body: ah, had decided to not remove this...
created_at: 2025-05-08T21:40:25Z
author_association: MEMBER
diff_hunk: @@ -494,7 +494,7 @@ usage() {
         " ls [-lvV] Name (list dataObject, -l -v for long form)",
         " ldt (list data types (those available))",
         " ",
-        "Time can be full or partial date/time: '2009-12-01' or '2009-12-11.12:03'",
+        "Time can be full or partial date/time: '2024-12-01' or '2024-12-11.12:03'",
path: src/isysmeta.cpp
user: login: alanking
body: The other date replacements say 2025
created_at: 2025-05-09T12:17:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: alanking
body: Some tests depend on this, so we need to find or make a replacement.
created_at: 2025-05-09T12:18:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1437,24 +1364,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_global_quotas(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "mkdir" ) == 0 ) {
-        if ( _rodsArgs->force == True ) {
-            int path_index = 1;
-#ifdef osx_platform
-            path_index = 2;
-#endif
-            generalAdmin( 0, "add", "dir",
-                          cmdToken[path_index], "",
-                          "", "",
-                          "", "",
-                          "", "" );
path: src/iadmin.cpp
user: login: alanking
body: Are we mainly interested in just removing `iadmin`'s exposure of this functionality, or the whole feature? The "add" of a "dir" is apparently part of the GeneralAdmin API.
created_at: 2025-05-09T12:19:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1672,11 +1581,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         generalAdmin( 0, "rm", "resource", cmdToken[1], cmdToken[2], cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "", _rodsArgs );
         return 0;
     }
-    if ( strcmp( cmdToken[0], "rmdir" ) == 0 ) {
-        generalAdmin( 0, "rm", "dir", cmdToken[1], cmdToken[2],
-                      cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "" );
-        return 0;
-    }
path: src/iadmin.cpp
user: login: alanking
body: Are we mainly interested in just removing `iadmin`'s exposure of this functionality, or the whole feature? The "rm" of a "dir" is apparently part of the GeneralAdmin API.
created_at: 2025-05-09T12:20:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -494,7 +494,7 @@ usage() {
         " ls [-lvV] Name (list dataObject, -l -v for long form)",
         " ldt (list data types (those available))",
         " ",
-        "Time can be full or partial date/time: '2009-12-01' or '2009-12-11.12:03'",
+        "Time can be full or partial date/time: '2024-12-01' or '2024-12-11.12:03'",
path: src/isysmeta.cpp
user: login: trel
body: yes, b/c dec 2025 hasn't happened yet.    open to suggestions - this was the least work :)
created_at: 2025-05-09T12:51:19Z
author_association: MEMBER
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: trel
body: if the test is just for coverage, we can remove the test - if the test is USING this functionality for something... I expect we can do it a different way / create a replacement.
created_at: 2025-05-09T12:52:13Z
author_association: MEMBER
diff_hunk: @@ -1437,24 +1364,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_global_quotas(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "mkdir" ) == 0 ) {
-        if ( _rodsArgs->force == True ) {
-            int path_index = 1;
-#ifdef osx_platform
-            path_index = 2;
-#endif
-            generalAdmin( 0, "add", "dir",
-                          cmdToken[path_index], "",
-                          "", "",
-                          "", "",
-                          "", "" );
path: src/iadmin.cpp
user: login: trel
body: i think the exposure for now.

regarding the whole feature... having an administrator side door that potentially/definitely doesn't go through policy feels... weird.
created_at: 2025-05-09T12:53:15Z
author_association: MEMBER
diff_hunk: @@ -1672,11 +1581,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         generalAdmin( 0, "rm", "resource", cmdToken[1], cmdToken[2], cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "", _rodsArgs );
         return 0;
     }
-    if ( strcmp( cmdToken[0], "rmdir" ) == 0 ) {
-        generalAdmin( 0, "rm", "dir", cmdToken[1], cmdToken[2],
-                      cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "" );
-        return 0;
-    }
path: src/iadmin.cpp
user: login: trel
body: i think the exposure for now.

regarding the whole feature... having an administrator side door that potentially/definitely doesn't go through policy feels... weird.
created_at: 2025-05-09T12:53:30Z
author_association: MEMBER
diff_hunk: @@ -2450,7 +2264,7 @@ usage( char *subOpt ) {
         "or comment.  Connection-info is the DNS host string:port, for example:",
         "irods.example.org:1247",
         "When modifying the conn information, it should be the hostname of the",
path: src/iadmin.cpp
user: login: trel
body: ```suggestion
        "When modifying the conn information, it should be the hostname of a",
```
created_at: 2025-05-09T13:16:34Z
author_association: MEMBER
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: alanking
body: It is actually being used. I think it can be replaced with GenQuery.
created_at: 2025-05-09T13:30:25Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1672,11 +1581,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         generalAdmin( 0, "rm", "resource", cmdToken[1], cmdToken[2], cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "", _rodsArgs );
         return 0;
     }
-    if ( strcmp( cmdToken[0], "rmdir" ) == 0 ) {
-        generalAdmin( 0, "rm", "dir", cmdToken[1], cmdToken[2],
-                      cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "" );
-        return 0;
-    }
path: src/iadmin.cpp
user: login: korydraughn
body: Agreed. As a result of this PR, the removed subcommands are deprecated. The deprecation can be captured in the release notes. Just need to open issues for removing the subcommands in the 6.0 milestone.
created_at: 2025-05-09T13:33:31Z
author_association: COLLABORATOR
diff_hunk: @@ -494,7 +494,7 @@ usage() {
         " ls [-lvV] Name (list dataObject, -l -v for long form)",
         " ldt (list data types (those available))",
         " ",
-        "Time can be full or partial date/time: '2009-12-01' or '2009-12-11.12:03'",
+        "Time can be full or partial date/time: '2024-12-01' or '2024-12-11.12:03'",
path: src/isysmeta.cpp
user: login: alanking
body: Well, that makes a lot of sense. Resolving.
created_at: 2025-05-09T13:34:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1437,24 +1364,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_global_quotas(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "mkdir" ) == 0 ) {
-        if ( _rodsArgs->force == True ) {
-            int path_index = 1;
-#ifdef osx_platform
-            path_index = 2;
-#endif
-            generalAdmin( 0, "add", "dir",
-                          cmdToken[path_index], "",
-                          "", "",
-                          "", "",
-                          "", "" );
path: src/iadmin.cpp
user: login: alanking
body: Okay. Consider making an issue for this and the "rm" of "dir" from GeneralAdmin API.
created_at: 2025-05-09T13:35:03Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1437,24 +1364,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_global_quotas(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "mkdir" ) == 0 ) {
-        if ( _rodsArgs->force == True ) {
-            int path_index = 1;
-#ifdef osx_platform
-            path_index = 2;
-#endif
-            generalAdmin( 0, "add", "dir",
-                          cmdToken[path_index], "",
-                          "", "",
-                          "", "",
-                          "", "" );
path: src/iadmin.cpp
user: login: trel
body: created as https://github.com/irods/irods/issues/8500
created_at: 2025-05-09T14:01:52Z
author_association: MEMBER
diff_hunk: @@ -1672,11 +1581,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         generalAdmin( 0, "rm", "resource", cmdToken[1], cmdToken[2], cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "", _rodsArgs );
         return 0;
     }
-    if ( strcmp( cmdToken[0], "rmdir" ) == 0 ) {
-        generalAdmin( 0, "rm", "dir", cmdToken[1], cmdToken[2],
-                      cmdToken[3], cmdToken[4], cmdToken[5], cmdToken[6], "", "" );
-        return 0;
-    }
path: src/iadmin.cpp
user: login: trel
body: created as https://github.com/irods/irods/issues/8499
created_at: 2025-05-09T14:02:58Z
author_association: MEMBER
diff_hunk: @@ -2450,7 +2264,7 @@ usage( char *subOpt ) {
         "or comment.  Connection-info is the DNS host string:port, for example:",
         "irods.example.org:1247",
         "When modifying the conn information, it should be the hostname of the",
path: src/iadmin.cpp
user: login: trel
body: done
created_at: 2025-05-09T14:06:11Z
author_association: MEMBER
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: trel
body: i see 13 lines in the tests... confirmed.

```
$ grep -rI "iadmin" . | grep -v -E "(c|i|o|a)ls" | grep "ls" | wc -l
13
```
created_at: 2025-05-09T17:23:38Z
author_association: MEMBER
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: trel
body: These appear pretty equivalent... and should be satisfactory for replacement with `iquest`...

```
$ iadmin ls logical_path /tempZone/home/rods/deleteme replica_number 0
COLL_ID: 10010
DATA_CREATE_TIME: 01746246391
DATA_CHECKSUM: 
DATA_EXPIRY: 00000000000
DATA_ID: 44644
DATA_REPL_STATUS: 1
DATA_MAP_ID: 0
DATA_MODE: 384
DATA_NAME: deleteme
DATA_OWNER_NAME: rods
DATA_OWNER_ZONE: tempZone
DATA_PATH: /var/lib/irods/Vault/home/rods/deleteme
DATA_REPL_NUM: 0
DATA_SIZE: 10186
DATA_STATUS: 
DATA_TYPE_NAME: generic
DATA_VERSION: 
DATA_MODIFY_TIME: 01746325408
DATA_COMMENTS: 
DATA_RESC_HIER: demoResc
DATA_RESC_ID: 10013
DATA_RESC_NAME: demoResc
```

and

```
$ iquest "select COLL_ID, DATA_CREATE_TIME, DATA_CHECKSUM, DATA_EXPIRY, DATA_ID, DATA_REPL_STATUS, DATA_MAP_ID, DATA_MODE, DATA_NAME, DATA_OWNER_NAME, DATA_OWNER_ZONE, DATA_PATH, DATA_REPL_NUM, DATA_SIZE, DATA_STATUS, DATA_TYPE_NAME, DATA_VERSION, DATA_MODIFY_TIME, DATA_COMMENTS, DATA_RESC_HIER, DATA_RESC_ID, DATA_RESC_NAME where COLL_NAME = '/tempZone/home/rods' and DATA_NAME = 'deleteme' and DATA_REPL_NUM = '0'"
COLL_ID = 10010
DATA_CREATE_TIME = 01746246391
DATA_CHECKSUM = 
DATA_EXPIRY = 00000000000
DATA_ID = 44644
DATA_REPL_STATUS = 1
DATA_MAP_ID = 0
DATA_MODE = 384
DATA_NAME = deleteme
DATA_OWNER_NAME = rods
DATA_OWNER_ZONE = tempZone
DATA_PATH = /var/lib/irods/Vault/home/rods/deleteme
DATA_REPL_NUM = 0
DATA_SIZE = 10186
DATA_STATUS = 
DATA_TYPE_NAME = generic
DATA_VERSION = 
DATA_MODIFY_TIME = 01746325408
DATA_COMMENTS = 
DATA_RESC_HIER = demoResc
DATA_RESC_ID = 10013
DATA_RESC_NAME = demoResc
------------------------------------------------------------
```
created_at: 2025-05-09T18:18:48Z
author_association: MEMBER
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: alanking
body: Very nice. Maybe we can make a little function in `lib.py` for the tests to call that returns a dict with that info.
created_at: 2025-05-09T18:27:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: trel
body: i like it.
created_at: 2025-05-09T18:31:26Z
author_association: MEMBER
diff_hunk: @@ -1266,10 +1197,6 @@ doCommand( char *cmdToken[], rodsArguments_t* _rodsArgs = 0 ) {
         show_resource(cmdToken[1]);
         return 0;
     }
-    if ( strcmp( cmdToken[0], "ls" ) == 0 ) {
-        ls_replica(cmdToken);
-        return 0;
-    }
path: src/iadmin.cpp
user: login: alanking
body: Work is being done here: https://github.com/irods/irods/pull/8506 Resolving.
created_at: 2025-05-12T21:34:05Z
author_association: CONTRIBUTOR

PR comments:
user: login: trel
created_at: 2025-05-09T20:34:07Z
body: squashed the help text updates to single commit.  iadmin still split.
author_association: MEMBER
user: login: trel
created_at: 2025-05-09T23:19:00Z
body: awaiting a companion PR for irods/irods where the tests that use `iadmin ls` are updated to use genquery.

The other subcommands (`mkdir`, `rmdir`, and `ctime`) are confirmed to not be used in the tests.
author_association: MEMBER
user: login: korydraughn
created_at: 2025-05-09T23:43:04Z
body: Okay. We'll get one up soonish.
author_association: COLLABORATOR