trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject svn commit: r1059308 [1/3] - in /trafficserver/traffic/trunk: ./ proxy/mgmt/ proxy/mgmt/api/ proxy/mgmt/api/include/ proxy/mgmt/api/remote/ proxy/mgmt/cli2/ proxy/mgmt/html2/ proxy/mgmt/html2/configure/ proxy/mgmt/html2/include/ proxy/mgmt/html2/tune/ ...
Date Sat, 15 Jan 2011 12:04:09 GMT
Author: igalic
Date: Sat Jan 15 12:04:08 2011
New Revision: 1059308

URL: http://svn.apache.org/viewvc?rev=1059308&view=rev
Log:
This is a good safe-point as we're back to compiling/linking and running.
Regression tests are passed also.

I've started by removing files from html2 and purge all the references to
these files, then recursively remove the references to these references.
115 files later... admin_access.config has fallen to the axe, but it's only the
first in a series..

Removed:
    trafficserver/traffic/trunk/proxy/mgmt/html2/configure/
    trafficserver/traffic/trunk/proxy/mgmt/html2/include/
    trafficserver/traffic/trunk/proxy/mgmt/html2/navigation_tree.xml
    trafficserver/traffic/trunk/proxy/mgmt/html2/navigation_tree.xml.win
    trafficserver/traffic/trunk/proxy/mgmt/html2/tune/
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpLog.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpLog.h
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpSession.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpSession.h
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebIntrMain.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebIntrMain.h
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebReconfig.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebReconfig.h
Modified:
    trafficserver/traffic/trunk/CHANGES
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/proxy/mgmt/AddConfigFilesHere.cc
    trafficserver/traffic/trunk/proxy/mgmt/LocalManager.cc
    trafficserver/traffic/trunk/proxy/mgmt/Main.cc
    trafficserver/traffic/trunk/proxy/mgmt/RecordsConfig.cc
    trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.cc
    trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.h
    trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.cc
    trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.h
    trafficserver/traffic/trunk/proxy/mgmt/api/GenericParser.cc
    trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPI.cc
    trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPIStub.cc
    trafficserver/traffic/trunk/proxy/mgmt/api/include/INKMgmtAPI.h
    trafficserver/traffic/trunk/proxy/mgmt/api/remote/APITestCliRemote.cc
    trafficserver/traffic/trunk/proxy/mgmt/cli2/ConfigCmd.cc
    trafficserver/traffic/trunk/proxy/mgmt/html2/Makefile.am
    trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.cc
    trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.h
    trafficserver/traffic/trunk/proxy/mgmt/web2/Makefile.am
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebConfigRender.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttp.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttp.h
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpRender.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpRender.h
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpTree.cc
    trafficserver/traffic/trunk/proxy/mgmt/web2/WebHttpTree.h

Modified: trafficserver/traffic/trunk/CHANGES
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/CHANGES?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/CHANGES (original)
+++ trafficserver/traffic/trunk/CHANGES Sat Jan 15 12:04:08 2011
@@ -2,6 +2,9 @@
 
 Changes with Apache Traffic Server 2.1.6
 
+  *) Purge of WebUI, by starting with html2 and recursively
+  moving through the code, removing everything useless. [TS-641]
+
   *) Rename proxy/http2 -> proxy/http and proxy/mgmt2 to proxy/mgmt [TS-631].
 
   *) Add an example to records.config for how to bind a specific IP [TS-582].

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Sat Jan 15 12:04:08 2011
@@ -1234,12 +1234,9 @@ AC_CONFIG_FILES([proxy/mgmt/cop/Makefile
 AS_IF([test "x$enable_webui" = "xyes"],
   [AC_CONFIG_FILES([proxy/mgmt/html2/Makefile])
    AC_CONFIG_FILES([proxy/mgmt/html2/charting/Makefile])
-   AC_CONFIG_FILES([proxy/mgmt/html2/configure/Makefile])
    AC_CONFIG_FILES([proxy/mgmt/html2/images/Makefile])
-   AC_CONFIG_FILES([proxy/mgmt/html2/include/Makefile])
    AC_CONFIG_FILES([proxy/mgmt/html2/monitor/Makefile])
    AC_CONFIG_FILES([proxy/mgmt/html2/mrtg/Makefile])
-   AC_CONFIG_FILES([proxy/mgmt/html2/tune/Makefile])
 ])
 AC_CONFIG_FILES([proxy/mgmt/Makefile])
 AC_CONFIG_FILES([proxy/mgmt/preparse/Makefile])

Modified: trafficserver/traffic/trunk/proxy/mgmt/AddConfigFilesHere.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/AddConfigFilesHere.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/AddConfigFilesHere.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/AddConfigFilesHere.cc Sat Jan 15 12:04:08 2011
@@ -81,7 +81,6 @@ initializeRegistry()
   configFiles->addFile("parent.config", false);
   configFiles->addFile("remap.config", false);
   configFiles->addFile("update.config", false);
-  configFiles->addFile("admin_access.config", false);
   configFiles->addFile("partition.config", false);
   configFiles->addFile("hosting.config", false);
   configFiles->addFile("congestion.config", false);

Modified: trafficserver/traffic/trunk/proxy/mgmt/LocalManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/LocalManager.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/LocalManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/LocalManager.cc Sat Jan 15 12:04:08 2011
@@ -37,7 +37,6 @@
 #include "Compatability.h"
 #include "LocalManager.h"
 #include "NTDefs.h"
-#include "WebReconfig.h"
 #include "MgmtSocket.h"
 
 #if TS_USE_POSIX_CAP
@@ -1035,11 +1034,6 @@ LocalManager::processEventQueue()
         }
         handled_by_mgmt = true;
       }
-      // admin_access.config
-      if (!(strcmp(data_raw, "admin_access.config"))) {
-        markAuthOtherUsersChange();
-        handled_by_mgmt = true;
-      }
 
     }
 

Modified: trafficserver/traffic/trunk/proxy/mgmt/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/Main.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/Main.cc Sat Jan 15 12:04:08 2011
@@ -37,10 +37,8 @@
 #include "MgmtUtils.h"
 #include "MgmtSchema.h"
 #include "WebMgmtUtils.h"
-#include "WebIntrMain.h"
 #include "WebOverview.h"
 #include "FileManager.h"
-#include "WebReconfig.h"
 #include "I_Layout.h"
 #include "I_Version.h"
 #include "ink_syslog.h"
@@ -484,7 +482,6 @@ main(int argc, char **argv)
   char userToRunAs[80];
   int  fds_throttle = -1;
   time_t ticker;
-  ink_thread webThrId;
 
   while ((setsid() == (pid_t) - 1) && (errno == EINTR)) {
   }
@@ -494,15 +491,6 @@ main(int argc, char **argv)
                        __DATE__, __TIME__, BUILD_MACHINE, BUILD_PERSON, "");
   initSignalHandlers();
 
-  // Process Environment Variables
-  if ((envVar = getenv("MGMT_WEB_PORT")) != NULL) {
-    web_port_arg = atoi(envVar);
-  }
-
-  if ((envVar = getenv("MGMT_ACONF_PORT")) != NULL) {
-    aconf_port_arg = atoi(envVar);
-  }
-
   if ((envVar = getenv("MGMT_CLUSTER_PORT")) != NULL) {
     cluster_port = atoi(envVar);
   }
@@ -529,13 +517,7 @@ main(int argc, char **argv)
         // The rest of the options require an argument in the form of -<Flag> <val>
         if ((i + 1) < argc) {
 
-          if (strcmp(argv[i], "-webPort") == 0) {
-            ++i;
-            web_port_arg = atoi(argv[i]);
-          } else if (strcmp(argv[i], "-aconfPort") == 0) {
-            ++i;
-            aconf_port_arg = atoi(argv[i]);
-          } else if (strcmp(argv[i], "-clusterPort") == 0) {
+          if (strcmp(argv[i], "-clusterPort") == 0) {
             ++i;
             cluster_port = atoi(argv[i]);
           } else if (strcmp(argv[i], "-groupAddr") == 0) {
@@ -827,8 +809,6 @@ main(int argc, char **argv)
   //   UI record for this machine
   overviewGenerator->addSelfRecord();
 
-  webThrId = ink_thread_create(webIntr_main, NULL);     /* Spin web agent thread */
-  Debug("lm", "Created Web Agent thread (%d)", webThrId);
   lmgmt->listenForProxy();
 
   /* Check the permissions on vip_config */
@@ -1103,7 +1083,6 @@ printUsage()
      "     -noProxy               Do not launch the proxy process.\n");
    */
   fprintf(stderr, "     -tsArgs        [...]   Args to proxy, everything till eol is passed.\n");
-  fprintf(stderr, "     -webPort       <port>  Port for web interface.\n");
   /*
      fprintf(stderr,
      "     -graphPort     <port>  Port for dynamic graphs.\n");
@@ -1154,7 +1133,8 @@ fileUpdated(char *fname)
     lmgmt->signalFileChange("proxy.config.admin.ip_allow.filename");
     // signalFileChange does not cause callbacks in the manager
     //  so generate one here by hand
-    markMgmtIpAllowChange();
+    // markMgmtIpAllowChange();
+    // XXX Cannot do this after purging WebReconfig -- what to do?
   } else if (strcmp(fname, "ip_allow.config") == 0) {
     lmgmt->signalFileChange("proxy.config.cache.ip_allow.filename");
   } else if (strcmp(fname, "vaddrs.config") == 0) {
@@ -1176,9 +1156,6 @@ fileUpdated(char *fname)
   } else if (strcmp(fname, "update.config") == 0) {
     lmgmt->signalFileChange("proxy.config.update.update_configuration");
 
-  } else if (strcmp(fname, "admin_access.config") == 0) {
-    lmgmt->signalFileChange("admin_access.config");
-
   } else if (strcmp(fname, "partition.config") == 0) {
     mgmt_log(stderr, "[fileUpdated] partition.config changed, need restart\n");
 

Modified: trafficserver/traffic/trunk/proxy/mgmt/RecordsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/RecordsConfig.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/RecordsConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/RecordsConfig.cc Sat Jan 15 12:04:08 2011
@@ -267,8 +267,6 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CONFIG, "proxy.config.cluster.log_bogus_mc_msgs", RECD_INT, "1", RECU_NULL, RR_NULL,
RECC_NULL, NULL, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.admin.html_doc_root", RECD_STRING, "<html_doc_root>",
RECU_NULL, RR_REQUIRED, RECC_NULL, NULL, RECA_NULL}
-  ,
   {RECT_CONFIG, "proxy.config.admin.web_interface_port", RECD_INT, "8081", RECU_RESTART_TM,
RR_REQUIRED, RECC_INT, "[0-65535]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.admin.autoconf_port", RECD_INT, "8083", RECU_RESTART_TM, RR_REQUIRED,
RECC_INT, "[0-65535]", RECA_NULL}
@@ -288,8 +286,6 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CONFIG, "proxy.config.admin.admin_password", RECD_STRING, "<admin_user_password>",
RECU_DYNAMIC, RR_REQUIRED, RECC_STR, ".*", RECA_NO_ACCESS}
   ,
-  {RECT_CONFIG, "proxy.config.admin.access_control_file", RECD_STRING, "admin_access.config",
RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
-  ,
   {RECT_CONFIG, "proxy.config.feature_set", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL,
NULL, RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.admin.basic_auth", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT,
"[0-1]", RECA_NULL}

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.cc Sat Jan 15 12:04:08 2011
@@ -71,160 +71,6 @@ CommentObj::getCfgEleCopy()
   return (INKCfgEle *) copy_comment_ele(m_ele);
 }
 
-//--------------------------------------------------------------------------
-// AdminAccessObj
-//--------------------------------------------------------------------------
-AdminAccessObj::AdminAccessObj(INKAdminAccessEle * ele)
-{
-  m_ele = ele;
-  m_valid = true;
-  m_valid = isValid();
-}
-
-AdminAccessObj::AdminAccessObj(TokenList * tokens)
-{
-  Token *tok;
-  int accessType;
-
-  m_ele = INKAdminAccessEleCreate();
-  m_ele->cfg_ele.error = INK_ERR_OKAY;
-  m_valid = true;
-
-  if (!tokens || tokens->length < 3) {
-    goto FORMAT_ERR;
-  }
-
-  m_ele->cfg_ele.type = get_rule_type(tokens, INK_FNAME_ADMIN_ACCESS);
-  if (m_ele->cfg_ele.type == INK_TYPE_UNDEFINED) {
-    goto FORMAT_ERR;
-  }
-  // The first token
-  tok = tokens->first();
-#ifdef TIGHT_RULE_CHECK
-  if (tok->value)
-    goto FORMAT_ERR;
-#endif
-  m_ele->user = xstrdup(tok->name);
-
-  // The second token
-  tok = tokens->next(tok);
-#ifdef TIGHT_RULE_CHECK
-  if (tok->value)
-    goto FORMAT_ERR;
-#endif
-  m_ele->password = xstrdup(tok->name);
-
-  // The third (last) token
-  tok = tokens->next(tok);
-#ifdef TIGHT_RULE_CHECK
-  if (tok->value)
-    goto FORMAT_ERR;
-#endif
-  accessType = ink_atoi(tok->name);
-  switch (accessType) {
-  case 0:
-    m_ele->access = INK_ACCESS_NONE;
-    break;
-  case 1:
-    m_ele->access = INK_ACCESS_MONITOR;
-    break;
-  case 2:
-    m_ele->access = INK_ACCESS_MONITOR_VIEW;
-    break;
-  case 3:
-    m_ele->access = INK_ACCESS_MONITOR_CHANGE;
-    break;
-  default:
-    m_ele->access = INK_ACCESS_UNDEFINED;
-    goto FORMAT_ERR;
-  }
-  m_ele->cfg_ele.error = INK_ERR_OKAY;
-  return;
-
-FORMAT_ERR:
-  m_ele->cfg_ele.error = INK_ERR_INVALID_CONFIG_RULE;
-  m_valid = false;
-}
-
-AdminAccessObj::~AdminAccessObj()
-{
-  INKAdminAccessEleDestroy(m_ele);
-}
-
-char *
-AdminAccessObj::formatEleToRule()
-{
-  if (!isValid()) {
-    m_ele->cfg_ele.error = INK_ERR_INVALID_CONFIG_RULE;
-    return NULL;
-  }
-
-  short accessType;
-
-  char buf[MAX_RULE_SIZE];
-  memset(buf, 0, MAX_RULE_SIZE);
-
-  switch (m_ele->access) {
-  case INK_ACCESS_NONE:
-    accessType = 0;
-    break;
-  case INK_ACCESS_MONITOR:
-    accessType = 1;
-    break;
-  case INK_ACCESS_MONITOR_VIEW:
-    accessType = 2;
-    break;
-  case INK_ACCESS_MONITOR_CHANGE:
-    accessType = 3;
-    break;
-  default:
-    accessType = 0;             // lv: just zero it
-    // Handled here:
-    // INK_ACCESS_UNDEFINED
-    break;
-  }
-
-  snprintf(buf, sizeof(buf), "%s:%s:%d:", m_ele->user, m_ele->password, accessType);
-
-  return xstrdup(buf);
-}
-
-bool AdminAccessObj::isValid()
-{
-  if (m_ele->cfg_ele.error != INK_ERR_OKAY) {
-    m_valid = false;
-  }
-  // Must have a user
-  if (!m_ele->user) {
-    m_valid = false;
-  }
-  // Must have a password
-  if (!m_ele->password) {
-    m_valid = false;
-  }
-  // validate access type
-  switch (m_ele->access) {
-  case INK_ACCESS_NONE:
-  case INK_ACCESS_MONITOR:
-  case INK_ACCESS_MONITOR_VIEW:
-  case INK_ACCESS_MONITOR_CHANGE:
-    break;
-  default:
-    m_valid = false;
-  }
-
-  if (!m_valid) {
-    m_ele->cfg_ele.error = INK_ERR_INVALID_CONFIG_RULE;
-  }
-
-  return m_valid;
-}
-
-INKCfgEle *
-AdminAccessObj::getCfgEleCopy()
-{
-  return (INKCfgEle *) copy_admin_access_ele(m_ele);
-}
 
 //--------------------------------------------------------------------------
 // CacheObj

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.h?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextImpl.h Sat Jan 15 12:04:08 2011
@@ -102,29 +102,6 @@ private:
 
 };
 
-/* admin_access.config    ****************************************/
-class AdminAccessObj:public CfgEleObj
-{
-public:
-  AdminAccessObj(INKAdminAccessEle * ele);
-  AdminAccessObj(TokenList * tokens);   //creates the ele
-  ~AdminAccessObj();
-
-  virtual char *formatEleToRule();
-  virtual bool isValid();
-  virtual INKCfgEle *getCfgEleCopy();
-  virtual INKCfgEle *getCfgEle()
-  {
-    return (INKCfgEle *) m_ele;
-  }
-  virtual INKRuleTypeT getRuleType()
-  {
-    return m_ele->cfg_ele.type;
-  }
-
-private:
-  INKAdminAccessEle * m_ele;
-};
 
 /* cache.config ***************************************************/
 class CacheObj:public CfgEleObj

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.cc Sat Jan 15 12:04:08 2011
@@ -1439,9 +1439,6 @@ char *
 filename_to_string(INKFileNameT file)
 {
   switch (file) {
-  case INK_FNAME_ADMIN_ACCESS:
-    return xstrdup("admin_access.config");
-
   case INK_FNAME_CACHE_OBJ:
     return xstrdup("cache.config");
 
@@ -1513,44 +1510,6 @@ string_to_congest_scheme_type(const char
   return INK_HTTP_CONGEST_UNDEFINED;
 }
 
-/* -------------------------------------------------------------------------
- * string_to_admin_acc_type
- * -------------------------------------------------------------------------
- */
-INKAccessT
-string_to_admin_acc_type(const char *access)
-{
-  if (strcmp(access, "none") == 0) {
-    return INK_ACCESS_NONE;
-  } else if (strcmp(access, "monitor_only") == 0) {
-    return INK_ACCESS_MONITOR;
-  } else if (strcmp(access, "monitor_config_view") == 0) {
-    return INK_ACCESS_MONITOR_VIEW;
-  } else if (strcmp(access, "monitor_config_change") == 0) {
-    return INK_ACCESS_MONITOR_CHANGE;
-  }
-
-  return INK_ACCESS_UNDEFINED;
-}
-
-char *
-admin_acc_type_to_string(INKAccessT access)
-{
-  switch (access) {
-  case INK_ACCESS_NONE:
-    return xstrdup("none");
-  case INK_ACCESS_MONITOR:
-    return xstrdup("monitor_only");
-  case INK_ACCESS_MONITOR_VIEW:
-    return xstrdup("monitor_config_view");
-  case INK_ACCESS_MONITOR_CHANGE:
-    return xstrdup("monitor_config_change");
-  default:
-    break;
-  }
-
-  return NULL;
-}
 
 
 /***************************************************************************
@@ -1951,9 +1910,6 @@ create_ele_obj_from_rule_node(Rule * rul
   // convert TokenList into an Ele
   // need switch statement to determine which Ele constructor to call
   switch (rule_type) {
-  case INK_ADMIN_ACCESS:       /* admin_access.config */
-    ele = (CfgEleObj *) new AdminAccessObj(token_list);
-    break;
   case INK_CACHE_NEVER:        /* all cache rules use same constructor */
   case INK_CACHE_IGNORE_NO_CACHE:
   case INK_CACHE_IGNORE_CLIENT_NO_CACHE:
@@ -2044,10 +2000,6 @@ create_ele_obj_from_ele(INKCfgEle * ele)
     return NULL;
 
   switch (ele->type) {
-  case INK_ADMIN_ACCESS:       /* admin_access.config */
-    ele_obj = (CfgEleObj *) new AdminAccessObj((INKAdminAccessEle *) ele);
-    break;
-
   case INK_CACHE_NEVER:        /* cache.config */
   case INK_CACHE_IGNORE_NO_CACHE:      // fall-through
   case INK_CACHE_IGNORE_CLIENT_NO_CACHE:       // fall-through
@@ -2152,9 +2104,6 @@ get_rule_type(TokenList * token_list, IN
   /* Depending on the file and rule type, need to find out which
      token specifies which type of rule it is */
   switch (file) {
-  case INK_FNAME_ADMIN_ACCESS: /* admin_access.config */
-    return INK_ADMIN_ACCESS;
-
   case INK_FNAME_CACHE_OBJ:    /* cache.config */
     tok = token_list->first();
     while (tok != NULL) {
@@ -2501,27 +2450,6 @@ copy_int_list(INKIntList list)
 }
 
 //////////////////////////////////////////////////
-INKAdminAccessEle *
-copy_admin_access_ele(INKAdminAccessEle * ele)
-{
-  if (!ele)
-    return NULL;
-
-  INKAdminAccessEle *nele = INKAdminAccessEleCreate();
-  if (!nele)
-    return NULL;
-
-  copy_cfg_ele(&(ele->cfg_ele), &(nele->cfg_ele));
-
-  if (ele->user)
-    nele->user = xstrdup(ele->user);
-  if (ele->password)
-    nele->password = xstrdup(ele->password);
-  nele->access = ele->access;
-
-  return nele;
-}
-
 INKCacheEle *
 copy_cache_ele(INKCacheEle * ele)
 {

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.h?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/CfgContextUtils.h Sat Jan 15 12:04:08 2011
@@ -174,7 +174,6 @@ INKDomainList copy_domain_list(INKDomain
 INKStringList copy_string_list(INKStringList list);
 INKIntList copy_int_list(INKIntList list);
 
-INKAdminAccessEle *copy_admin_access_ele(INKAdminAccessEle * ele);
 INKCacheEle *copy_cache_ele(INKCacheEle * ele);
 INKCongestionEle *copy_congestion_ele(INKCongestionEle * ele);
 INKHostingEle *copy_hosting_ele(INKHostingEle * ele);

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/GenericParser.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/GenericParser.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/GenericParser.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/GenericParser.cc Sat Jan 15 12:04:08 2011
@@ -206,8 +206,6 @@ Rule::parse(const char *const_rule, INKF
   m_filetype = filetype;
 
   switch (m_filetype) {
-  case INK_FNAME_ADMIN_ACCESS: /* admin_access.config */
-    return admin_accessParse(rule);
   case INK_FNAME_CACHE_OBJ:    /* cache.config */
     return cacheParse(rule);
   case INK_FNAME_CONGESTION:   /* congestion.config */
@@ -247,16 +245,6 @@ Rule::parse(const char *const_rule, INKF
 
 
 /**
- * admin_accessParse
- **/
-TokenList *
-Rule::admin_accessParse(char *rule)
-{
-  return icpParse(rule, 3, 3);
-}
-
-
-/**
  * arm_securityParse
  **/
 TokenList *
@@ -966,9 +954,7 @@ RuleList::parse(char *fileBuf, const cha
 {
   m_filename = xstrdup(filename);
 
-  if (strstr(filename, "admin_access.config")) {
-    m_filetype = INK_FNAME_ADMIN_ACCESS;        /* admin_access.config */
-  } else if (strstr(filename, "cache.config")) {
+  if (strstr(filename, "cache.config")) {
     m_filetype = INK_FNAME_CACHE_OBJ;   /* cache.config */
   } else if (strstr(filename, "congestion.config")) {
     m_filetype = INK_FNAME_CONGESTION;  /* congestion.config */

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPI.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPI.cc Sat Jan 15 12:04:08 2011
@@ -938,40 +938,6 @@ INKPdSsFormatDestroy(INKPdSsFormat * ele
   return;
 }
 
-/*-------------------------------------------------------------
- * INKAdminAccessEle
- *-------------------------------------------------------------*/
-inkapi INKAdminAccessEle *
-INKAdminAccessEleCreate()
-{
-  INKAdminAccessEle *ele;
-
-  ele = (INKAdminAccessEle *) xmalloc(sizeof(INKAdminAccessEle));
-  if (!ele)
-    return NULL;
-
-  ele->cfg_ele.type = INK_ADMIN_ACCESS;
-  ele->cfg_ele.error = INK_ERR_OKAY;
-  ele->user = NULL;
-  ele->password = NULL;
-  ele->access = INK_ACCESS_UNDEFINED;
-
-  return ele;
-}
-
-inkapi void
-INKAdminAccessEleDestroy(INKAdminAccessEle * ele)
-{
-  if (ele) {
-    if (ele->user)
-      xfree(ele->user);
-    if (ele->password)
-      xfree(ele->password);
-    xfree(ele);
-  }
-  return;
-}
-
 
 /*-------------------------------------------------------------
  * CacheObj

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPIStub.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPIStub.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPIStub.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/INKMgmtAPIStub.cc Sat Jan 15 12:04:08 2011
@@ -295,18 +295,6 @@ INKPdSsFormatDestroy(INKPdSsFormat * ele
   return;
 }
 
-inkapi INKAdminAccessEle *
-INKAdminAccessEleCreate()
-{
-  return NULL;
-}
-
-inkapi void
-INKAdminAccessEleDestroy(INKAdminAccessEle * ele)
-{
-  return;
-}
-
 inkapi INKArmSecurityEle *
 INKArmSecurityEleCreate()
 {

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/include/INKMgmtAPI.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/include/INKMgmtAPI.h?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/include/INKMgmtAPI.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/include/INKMgmtAPI.h Sat Jan 15 12:04:08 2011
@@ -389,7 +389,6 @@ typedef enum
 
   typedef enum
   {
-    INK_FNAME_ADMIN_ACCESS,     /* admin_access.config */
     INK_FNAME_CACHE_OBJ,        /* cache.config */
     INK_FNAME_CONGESTION,       /* congestion.config */
     INK_FNAME_HOSTING,          /* hosting.config */
@@ -420,7 +419,6 @@ typedef enum
  */
   typedef enum
   {
-    INK_ADMIN_ACCESS,           /* admin_access.config */
     INK_CACHE_NEVER,            /* cache.config */
     INK_CACHE_IGNORE_NO_CACHE,
     INK_CACHE_IGNORE_CLIENT_NO_CACHE,
@@ -584,15 +582,6 @@ typedef enum
     INKError error;
   } INKCfgEle;
 
-/* admin_access.config */
-  typedef struct
-  {
-    INKCfgEle cfg_ele;
-    char *user;                 /* username */
-    char *password;             /* MD5 encrypted */
-    INKAccessT access;          /* type of access allowed for user */
-  } INKAdminAccessEle;
-
 /* cache.config */
   typedef struct
   {
@@ -928,8 +917,6 @@ typedef enum
   inkapi void INKSspecDestroy(INKSspec * ele);
   inkapi INKPdSsFormat *INKPdSsFormatCreate();
   inkapi void INKPdSsFormatDestroy(INKPdSsFormat * ele);
-  inkapi INKAdminAccessEle *INKAdminAccessEleCreate();
-  inkapi void INKAdminAccessEleDestroy(INKAdminAccessEle * ele);
   inkapi INKCacheEle *INKCacheEleCreate(INKRuleTypeT type);
   inkapi void INKCacheEleDestroy(INKCacheEle * ele);
   inkapi INKCongestionEle *INKCongestionEleCreate();

Modified: trafficserver/traffic/trunk/proxy/mgmt/api/remote/APITestCliRemote.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/api/remote/APITestCliRemote.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/api/remote/APITestCliRemote.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/api/remote/APITestCliRemote.cc Sat Jan 15 12:04:08
2011
@@ -377,38 +377,6 @@ print_pd_sspec(INKPdSsFormat info)
 // Ele printing functions
 //
 
-void
-print_admin_access_ele(INKAdminAccessEle * ele)
-{
-  if (!ele) {
-    fprintf(stderr, "print_admin_access_ele: ele is NULL\n");
-    return;
-  }
-
-  char accessType;
-  switch (ele->access) {
-  case INK_ACCESS_NONE:
-    accessType = '0';
-    break;
-  case INK_ACCESS_MONITOR:
-    accessType = '1';
-    break;
-  case INK_ACCESS_MONITOR_VIEW:
-    accessType = '2';
-    break;
-  case INK_ACCESS_MONITOR_CHANGE:
-    accessType = '3';
-    break;
-  default:
-    accessType = '?';           /* lv: to make gcc happy and don't brake fprintf */
-    // Handled here:
-    // INK_ACCESS_UNDEFINED
-    break;
-  }
-
-  fprintf(stderr, "%s:%s:%c:\n", ele->user, ele->password, accessType);
-  return;
-}
 
 void
 print_cache_ele(INKCacheEle * ele)
@@ -858,9 +826,6 @@ print_ele_list(INKFileNameT file, INKCfg
     ele = INKCfgContextGetEleAt(ctx, i);
 
     switch (filename) {
-    case INK_FNAME_ADMIN_ACCESS:
-      print_admin_access_ele((INKAdminAccessEle *) ele);
-      break;
     case INK_FNAME_CACHE_OBJ:
       print_cache_ele((INKCacheEle *) ele);
       break;
@@ -1604,9 +1569,7 @@ test_cfg_context_get(char *args)
   name[strlen(filename) - 1] = '\0';
 
   // convert file name to INKFileNameT
-  if (strcmp(name, "admin_access.config") == 0) {
-    file = INK_FNAME_ADMIN_ACCESS;
-  } else if (strcmp(name, "cache.config") == 0) {
+  if (strcmp(name, "cache.config") == 0) {
     file = INK_FNAME_CACHE_OBJ;
   } else if (strcmp(name, "congestion.config") == 0) {
     file = INK_FNAME_CONGESTION;
@@ -1680,9 +1643,7 @@ test_cfg_context_move(char *args)
   name[strlen(filename) - 1] = '\0';
 
   // convert file name to INKFileNameT
-  if (strcmp(name, "admin_access.config") == 0) {
-    file = INK_FNAME_ADMIN_ACCESS;
-  } else if (strcmp(name, "cache.config") == 0) {
+  if (strcmp(name, "cache.config") == 0) {
     file = INK_FNAME_CACHE_OBJ;
   } else if (strcmp(name, "congestion.config") == 0) {
     file = INK_FNAME_CONGESTION;

Modified: trafficserver/traffic/trunk/proxy/mgmt/cli2/ConfigCmd.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/cli2/ConfigCmd.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/cli2/ConfigCmd.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/cli2/ConfigCmd.cc Sat Jan 15 12:04:08 2011
@@ -953,9 +953,6 @@ Cmd_ConfigSecurity(ClientData clientData
     case CMD_CONFIG_SECURITY_MGMT:
       return (Cli_ConfigFileURL_Action(INK_FNAME_MGMT_ALLOW, "mgmt_allow.config", argtable->arg_string));
 
-    case CMD_CONFIG_SECURITY_ADMIN:
-      return (Cli_ConfigFileURL_Action(INK_FNAME_ADMIN_ACCESS, "admin_access.config", argtable->arg_string));
-
     case CMD_CONFIG_SECURITY_PASSWORD:
       return (ConfigSecurityPasswd());
     }

Modified: trafficserver/traffic/trunk/proxy/mgmt/html2/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/html2/Makefile.am?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/html2/Makefile.am (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/html2/Makefile.am Sat Jan 15 12:04:08 2011
@@ -17,17 +17,14 @@
 sysconfdir = $(pkgsysconfdir)
 dist_sysconf_DATA = english.dict
 
-SUBDIRS = charting configure images include monitor mrtg tune
+SUBDIRS = charting images monitor mrtg
 
 install-data-local:
 	$(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkgdatadir) \
 	$(DESTDIR)$(pkgdatadir)/charting \
-	$(DESTDIR)$(pkgdatadir)/configure \
 	$(DESTDIR)$(pkgdatadir)/images \
-	$(DESTDIR)$(pkgdatadir)/include \
 	$(DESTDIR)$(pkgdatadir)/monitor \
-	$(DESTDIR)$(pkgdatadir)/mrtg \
-	$(DESTDIR)$(pkgdatadir)/tune
+	$(DESTDIR)$(pkgdatadir)/mrtg
 
 uninstall-hook:
 	-rm -rf $(DESTDIR)$(pkgdatadir)

Modified: trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.cc?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.cc Sat Jan 15 12:04:08 2011
@@ -1013,6 +1013,42 @@ substituteForHTMLChars(const char *buffe
   return safeBuf;
 }
 
+// These fucntions have been migrated from web2
+
+
+//
+//
+//  Sets the LocalManager variable:  proxy.node.hostname
+//
+//    To the fully qualified hostname for the machine
+//       that we are running on
+int
+setHostnameVar()
+{
+  char ourHostName[MAXDNAME];
+  char *firstDot;
+
+  // Get Our HostName
+  if (gethostname(ourHostName, MAXDNAME) < 0) {
+    mgmt_fatal(stderr, "[setHostnameVar] Can not determine our hostname");
+  }
+
+  res_init();
+  appendDefaultDomain(ourHostName, MAXDNAME);
+
+  // FQ is a Fully Qualified hostname (ie: proxydev.example.com)
+  varSetFromStr("proxy.node.hostname_FQ", ourHostName);
+
+  // non-FQ is just the hostname (ie: proxydev)
+  firstDot = strchr(ourHostName, '.');
+  if (firstDot != NULL) {
+    *firstDot = '\0';
+  }
+  varSetFromStr("proxy.node.hostname", ourHostName);
+
+  return 0;
+}
+
 
 // bool ProxyShutdown()
 //

Modified: trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.h?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/utils/WebMgmtUtils.h Sat Jan 15 12:04:08 2011
@@ -92,6 +92,9 @@ int convertHtmlToUnix(char *buffer);
 int substituteUnsafeChars(char *buffer);
 char *substituteForHTMLChars(const char *buffer);
 
+// These functions are migrated from web2
+int setHostnameVar();
+
 // Produce a hash table based on a HTML form submission
 //
 //  CALLEE deallocates hashtable

Modified: trafficserver/traffic/trunk/proxy/mgmt/web2/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt/web2/Makefile.am?rev=1059308&r1=1059307&r2=1059308&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt/web2/Makefile.am (original)
+++ trafficserver/traffic/trunk/proxy/mgmt/web2/Makefile.am Sat Jan 15 12:04:08 2011
@@ -51,20 +51,12 @@ libweb_a_SOURCES = \
   WebHttp.h \
   WebHttpContext.cc \
   WebHttpContext.h \
-  WebHttpLog.cc \
-  WebHttpLog.h \
   WebHttpMessage.cc \
   WebHttpMessage.h \
   WebHttpRender.cc \
   WebHttpRender.h \
-  WebHttpSession.cc \
-  WebHttpSession.h \
-  WebIntrMain.cc \
-  WebIntrMain.h \
   WebOverview.cc \
   WebOverview.h \
-  WebReconfig.cc \
-  WebReconfig.h \
   WebUtils.cc \
   WebUtils.h
 



Mime
View raw message