[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at 0f8603af9debf0b80c8b8b8a80db2641892e5801

Michael DeHaan mdehaan at redhat.com
Tue Jun 26 22:30:15 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  0f8603af9debf0b80c8b8b8a80db2641892e5801 (commit)
       via  f29da8096c61d6d274ab8e74a23befb422766f65 (commit)
       via  a983173e1574888803d1bfe88129685fd21515bc (commit)
       via  fc13ac71bee336295c61acac35b86dfc40846901 (commit)
       via  a8549201a1eda98aff947db63ac7676436457abb (commit)
      from  ea02bbf4372aee9585e50e3da59d8085e1a89e7d (commit)

- Log -----------------------------------------------------------------
commit 0f8603af9debf0b80c8b8b8a80db2641892e5801
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Tue Jun 26 18:31:42 2007 -0400

    Bump debug levels

commit f29da8096c61d6d274ab8e74a23befb422766f65
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Tue Jun 26 18:22:46 2007 -0400

    Fixes related to virtual registration.

commit a983173e1574888803d1bfe88129685fd21515bc
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Tue Jun 26 18:01:50 2007 -0400

    Virtual systems must register as guests ("deployments"), not hosts ("machines")

commit fc13ac71bee336295c61acac35b86dfc40846901
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Tue Jun 26 17:37:43 2007 -0400

    regtokens are not needed under the current auth mechanism.

commit a8549201a1eda98aff947db63ac7676436457abb
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Tue Jun 26 17:36:11 2007 -0400

    Remove links that are inoperative.
-----------------------------------------------------------------------

Diffstat:
 service/modules/deployment.py             |   18 ++++++++++++++++++
 service/modules/machine.py                |   27 ---------------------------
 service/modules/provisioning.py           |    7 ++++---
 service/modules/registration.py           |   11 ++++++-----
 wui/src/app/helpers/application_helper.rb |    6 ++++--
 wui/src/app/views/login/input.rhtml       |    4 ++++
 6 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/service/modules/deployment.py b/service/modules/deployment.py
index 21060ae..e8a3bfa 100755
--- a/service/modules/deployment.py
+++ b/service/modules/deployment.py
@@ -378,6 +378,24 @@ class Deployment(web_svc.AuthWebSvc):
          })
 
 
+    def get_by_mac_address(self, token, args):
+        """
+        """
+        required = ('mac_address',)
+        FieldValidator(args).verify_required(required)
+        session = db.open_session()
+        try:
+            result = []
+            mac_address = args['mac_address']
+            offset, limit = self.offset_and_limit(args)
+            query = session.query(db.Machine).limit(limit).offset(offset)
+            for machine in query.select_by(mac_address = mac_address):
+                result.append(self.expand(machine))
+            return success(result)
+        finally:
+            session.close()
+
+
     def get_by_hostname(self, token, args):
         """
         Get deployments by hostname.
diff --git a/service/modules/machine.py b/service/modules/machine.py
index 47083a0..c2562fb 100755
--- a/service/modules/machine.py
+++ b/service/modules/machine.py
@@ -338,33 +338,6 @@ class Machine(web_svc.AuthWebSvc):
 
     def get_by_mac_address(self, token, args):
         """
-        Get a machines by MAC address.
-        @param token: A security token.
-        @type token: string
-        @param args: A dictionary of machine attributes.
-            - mac_address
-            - offset (optional)
-            - limit (optional)
-        @type args: dict
-        @return A list of machines.
-        @rtype: [dict,]
-            - id
-            - hostname (optional)
-            - ip_address (optional)
-            - registration_token (optional)
-            - architecture (optional)
-            - processor_speed (optional)
-            - processor_count  (optional)
-            - memory (optional)
-            - kernel_options  (optional)
-            - kickstart_metadata (optional)
-            - list_group (optional)
-            - mac_address (optional)
-            - is_container (optional)
-            - profile_id
-            - puppet_node_diff (optional)
-            - netboot_enabled (optional)
-        @raise SQLException: On database error
         """
         required = ('mac_address',)
         FieldValidator(args).verify_required(required)
diff --git a/service/modules/provisioning.py b/service/modules/provisioning.py
index 8c39520..1c42325 100755
--- a/service/modules/provisioning.py
+++ b/service/modules/provisioning.py
@@ -368,8 +368,9 @@ class CobblerTranslatedSystem:
        if from_db.has_key("ip_address"):
            pxe_address = from_db["ip_address"]
 
-       # FIXME: deal with is_virtual
-
+       if is_virtual:
+           # make sure guests get registered as guests, not hosts
+           ks_meta["server_param"] = ks_meta["server_param"] + " --virtual"
 
        new_item.set_kernel_options(kernel_options)
        new_item.set_ksmeta(ks_meta)
@@ -463,7 +464,7 @@ class Provisioning(web_svc.AuthWebSvc):
              CobblerTranslatedSystem(cobbler_api,profiles,p)
          for dp in deployments:
              print "- deployment: %s" % dp
-             CobblerTranslatedSystem(cobbler_api,profiles,dp)
+             CobblerTranslatedSystem(cobbler_api,profiles,dp,virtual=True)
          
 
          cobbler_api.serialize()
diff --git a/service/modules/registration.py b/service/modules/registration.py
index 927a94d..3ed02a7 100755
--- a/service/modules/registration.py
+++ b/service/modules/registration.py
@@ -64,20 +64,21 @@ class Registration(web_svc.AuthWebSvc):
             abstract_obj = deployment.Deployment()
         else:
             abstract_obj = machine.Machine()
-        self.logger.debug("registering against mac address: %s" % mac_addr)
+        self.logger.info("registering against mac address: %s" % mac_addr)
         results = abstract_obj.get_by_mac_address({}, { "mac_address" : mac_addr })
         self.logger.debug("done with mac_address query")
         if results.error_code != 0:
             return results
         if len(results.data) > 0:
-            self.logger.debug("results = %s" % results)
+            self.logger.info("results = %s" % results)
             abstract_id =  results.data[0]["id"]
-            self.logger.debug("existing id = %s" % abstract_id)
+            self.logger.info("existing id = %s" % abstract_id)
         else:
+            # should never happen for virtual machines 
             results = abstract_obj.new(token)
-            self.logger.debug("results = %s" % results)
+            self.logger.info("results = %s" % results)
             abstract_id = results.data 
-            self.logger.debug("new abstract id = %s" % abstract_id)
+            self.logger.info("new abstract id = %s" % abstract_id)
 
         profile_id = None
 
diff --git a/wui/src/app/helpers/application_helper.rb b/wui/src/app/helpers/application_helper.rb
index ace9a87..56761af 100644
--- a/wui/src/app/helpers/application_helper.rb
+++ b/wui/src/app/helpers/application_helper.rb
@@ -16,9 +16,11 @@ module ApplicationHelper
 	   <ul>
 	   <li><A HREF="#{app_root}/machine/list"><%= _("View Machines") %></A></li>
 	   <li><A HREF="#{app_root}/machine/edit"><%= _("Add a Machine via PXE") %></A></li>
-	   <li><A HREF="#{app_root}/regtoken/edit"><%= _("Create Registration Tokens") %></A></li>
+	   <!-- not needed under current auth mechanism
+           <li><A HREF="#{app_root}/regtoken/edit"><%= _("Create Registration Tokens") %></A></li>
 	   <li><A HREF="#{app_root}/regtoken/list"><%= _("View Registration Tokens") %></A></li>
-	   </ul>
+	   -->
+           </ul>
        </li>
        <li><strong><%= _("Image Profiles") %></strong>
 	   <ul>
diff --git a/wui/src/app/views/login/input.rhtml b/wui/src/app/views/login/input.rhtml
index 72b63a5..89d8234 100755
--- a/wui/src/app/views/login/input.rhtml
+++ b/wui/src/app/views/login/input.rhtml
@@ -8,11 +8,15 @@
   <dt><%= _("Username:") %></dt>
     <dd>
 <%= text_field("form", "username", :class => "text-input") %></dd>
+<!--
     <dd class="caption"><%= _("No Account?") %> <a href="#"><%= _("Request one.") %></a></dd>
+-->
   <dt><%= _("Password:") %></dt>
     <dd>
 <%= text_field("form", "password", :class => "text-input") %></dd>
+<!--
     <dd class="caption"><a href="#"><%= _("Forgot your password?") %></a></dd>
+-->
     <dd><input class="button-input" type="submit" value=<%= _("Log In") %>></dd>
 </dl>
 

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  ea02bbf4372aee9585e50e3da59d8085e1a89e7d \
  0f8603af9debf0b80c8b8b8a80db2641892e5801




More information about the Et-mgmt-commits-list mailing list