diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py
index ea15dd5..f8f40e5 100644
--- a/cobbler/action_reposync.py
+++ b/cobbler/action_reposync.py
@@ -72,176 +72,20 @@ class RepoSync:
                 print _("- %s is set to not be updated") % repo.name
                 continue
 
-            repo_path = os.path.join(self.settings.webdir, "repo_mirror", repo.name)
+            repo_mirror = os.path.join(self.settings.webdir, "repo_mirror")
+            repo_path = os.path.join(repo_mirror, repo.name)
             mirror = repo.mirror
 
             if not os.path.isdir(repo_path) and not repo.mirror.lower().startswith("rhn://"):
                 os.makedirs(repo_path)
             
-            if repo.is_rsync_mirror():
-                self.do_rsync(repo)
-            else:
-                # which may actually NOT reposync if the repo is set to not mirror locally
-                # but that's a technicality
-                self.do_reposync(repo)
+            # which may actually NOT reposync if the repo is set to not mirror locally
+            # but that's a technicality
+            repo.sync(repo_mirror,self)
             self.update_permissions(repo_path)
 
         return True
     
-    # ==================================================================
-  
-    def do_reposync(self,repo):
-
-        """
-        Handle copying of http:// and ftp:// repos.
-        """
-
-        # warn about not having yum-utils.  We don't want to require it in the package because
-        # RHEL4 and RHEL5U0 don't have it.
-
-        if not os.path.exists("/usr/bin/reposync"):
-            raise CX(_("no /usr/bin/reposync found, please install yum-utils"))
-
-        cmds = []                 # queues up commands to run
-        is_rhn = False            # RHN repositories require extra black magic
-        has_rpm_list = False      # flag indicating not to pull the whole repo
-
-        # detect cases that require special handling
-
-        if repo.mirror.lower().startswith("rhn://"):
-            is_rhn = True
-        if repo.rpm_list != "":
-            has_rpm_list = True
-
-        # create yum config file for use by reposync
-        store_path = os.path.join(self.settings.webdir, "repo_mirror")
-        dest_path = os.path.join(store_path, repo.name)
-        temp_path = os.path.join(store_path, ".origin")
-        if not os.path.isdir(temp_path) and repo.mirror_locally:
-            # FIXME: there's a chance this might break the RHN D/L case
-            os.makedirs(temp_path)
-         
-        # how we invoke yum-utils depends on whether this is RHN content or not.
-
-       
-
-        if not is_rhn:
-
-            # this is the simple non-RHN case.
-            # create the config file that yum will use for the copying
-
-            if repo.mirror_locally:
-                temp_file = self.create_local_file(repo, temp_path, output=False)
-
-            if not has_rpm_list and repo.mirror_locally:
-                # if we have not requested only certain RPMs, use reposync
-                cmd = "/usr/bin/reposync %s --config=%s --repoid=%s --download_path=%s" % (self.rflags, temp_file, repo.name, store_path)
-                if repo.arch != "":
-                    if repo.arch == "x86":
-                       repo.arch = "i386" # FIX potential arch errors
-                    if repo.arch == "i386":
-                       # counter-intuitive, but we want the newish kernels too
-                       cmd = "%s -a i686" % (cmd)
-                    else:
-                       cmd = "%s -a %s" % (cmd, repo.arch)
-                    
-                print _("- %s") % cmd
-                cmds.append(cmd)
-
-            elif repo.mirror_locally:
-
-                # create the output directory if it doesn't exist
-                if not os.path.exists(dest_path):
-                   os.makedirs(dest_path)
-
-                use_source = ""
-                if repo.arch == "src":
-                    use_source = "--source"
- 
-                # older yumdownloader sometimes explodes on --resolvedeps
-                # if this happens to you, upgrade yum & yum-utils
-                extra_flags = self.settings.yumdownloader_flags
-                cmd = "/usr/bin/yumdownloader %s %s -c %s --destdir=%s %s" % (extra_flags, use_source, temp_file, dest_path, " ".join(repo.rpm_list))
-                print _("- %s") % cmd
-                cmds.append(cmd)
-        else:
-
-            # this is the somewhat more-complex RHN case.
-            # NOTE: this requires that you have entitlements for the server and you give the mirror as rhn://$channelname
-            if not repo.mirror_locally:
-                raise CX(_("rhn:// repos do not work with --mirror-locally=1"))
-
-            if has_rpm_list:
-                print _("- warning: --rpm-list is not supported for RHN content")
-            rest = repo.mirror[6:] # everything after rhn://
-            cmd = "/usr/bin/reposync %s -r %s --download_path=%s" % (self.rflags, rest, store_path)
-            if repo.name != rest:
-                args = { "name" : repo.name, "rest" : rest }
-                raise CX(_("ERROR: repository %(name)s needs to be renamed %(rest)s as the name of the cobbler repository must match the name of the RHN channel") % args)
-
-            if repo.arch == "i386":
-                # counter-intuitive, but we want the newish kernels too
-                repo.arch = "i686"
-
-            if repo.arch != "":
-                cmd = "%s -a %s" % (cmd, repo.arch)
-
-            cmds.append(cmd)
-
-        # now regardless of whether we're doing yumdownloader or reposync
-        # or whether the repo was http://, ftp://, or rhn://, execute all queued
-        # commands here.  Any failure at any point stops the operation.
-
-        for cmd in cmds:
-            if repo.mirror_locally:
-                rc = sub_process.call(cmd, shell=True)
-                if rc !=0:
-                    raise CX(_("cobbler reposync failed"))
-
-        # some more special case handling for RHN.
-        # create the config file now, because the directory didn't exist earlier
-
-        if is_rhn:
-            temp_file = self.create_local_file(repo, temp_path, output=False)
-
-        # now run createrepo to rebuild the index
-
-        if repo.mirror_locally:
-            os.path.walk(dest_path, self.createrepo_walker, repo)
-
-        # create the config file the hosts will use to access the repository.
-
-        self.create_local_file(repo, dest_path)
- 
-
-    # ==================================================================================
-
-    def do_rsync(self,repo):
-
-        """
-        Handle copying of rsync:// and rsync-over-ssh repos.
-        """
-
-        if not repo.mirror_locally:
-            raise CX(_("rsync:// urls must be mirrored locally, yum cannot access them directly"))
-
-        if repo.rpm_list != "":
-            print _("- warning: --rpm-list is not supported for rsync'd repositories")
-        dest_path = os.path.join(self.settings.webdir, "repo_mirror", repo.name)
-        spacer = ""
-        if not repo.mirror.startswith("rsync://") and not repo.mirror.startswith("/"):
-            spacer = "-e ssh"
-        if not repo.mirror.endswith("/"):
-            repo.mirror = "%s/" % repo.mirror
-        cmd = "rsync -rltDv %s --delete --delete-excluded --exclude-from=/etc/cobbler/rsync.exclude %s %s" % (spacer, repo.mirror, dest_path)       
-        print _("- %s") % cmd
-        rc = sub_process.call(cmd, shell=True)
-        if rc !=0:
-            raise CX(_("cobbler reposync failed"))
-        print _("- walking: %s") % dest_path
-        os.path.walk(dest_path, self.createrepo_walker, repo)
-        self.create_local_file(repo, dest_path)
-    
     # ==================================================================================
 
     def create_local_file(self, repo, dest_path, output=True):
@@ -303,7 +147,7 @@ class RepoSync:
         """
         Used to run createrepo on a copied mirror.
         """
-        if os.path.exists(dirname) or repo.is_rsync_mirror():
+        if os.path.exists(dirname) or repo['breed'] == 'rsync':
             utils.remove_yum_olddata(dirname)
             try:
                 cmd = "createrepo %s %s" % (repo.createrepo_flags, dirname)
diff --git a/cobbler/collection_repos.py b/cobbler/collection_repos.py
index 0e4c85b..48e7818 100644
--- a/cobbler/collection_repos.py
+++ b/cobbler/collection_repos.py
@@ -42,6 +42,20 @@ class Repos(collection.Collection):
         """
         Return a system forged from seed_data
         """
+        if seed_data.has_key('breed'):
+            if seed_data['breed'] == "rsync":
+                return repo.RsyncRepo(config).from_datastruct(seed_data)
+            elif seed_data['breed'] == "redhat":
+                return repo.YumRepo(config).from_datastruct(seed_data)
+        # Required until rsync breed is properly set on every required case
+        # Block, taken from is_rsync_mirror
+        lower = seed_data.get("mirror")
+        print "hola tu",lower
+        if not ( lower.startswith("http://") or lower.startswith("ftp://") or lower.startswith("rhn://") ):
+            seed_data['breed'] = "rsync"
+            print "adios tu",seed_data['breed']
+            return repo.RsyncRepo(config).from_datastruct(seed_data)
+        # 
         return repo.Repo(config).from_datastruct(seed_data)
 
     def remove(self,name,with_delete=True,with_sync=True,with_triggers=True,recursive=False):
diff --git a/cobbler/item_repo.py b/cobbler/item_repo.py
index b9958ef..0158a82 100644
--- a/cobbler/item_repo.py
+++ b/cobbler/item_repo.py
@@ -24,6 +24,8 @@ import utils
 import item
 from cexceptions import *
 from utils import _
+import os.path
+import sub_process
 
 class Repo(item.Item):
 
@@ -46,6 +48,7 @@ class Repo(item.Item):
         self.rpm_list         = ("",         '<<inherit>>')[is_subobject]
         self.createrepo_flags = ("-c cache", '<<inherit>>')[is_subobject]
         self.depth            = 2  # arbitrary, as not really apart of the graph
+        self.breed            = ""
         self.arch             = "" # use default arch
         self.yumopts          = {}
         self.owners           = self.settings.default_ownership
@@ -59,6 +62,7 @@ class Repo(item.Item):
         self.priority         = self.load_item(seed_data, 'priority',99)
         self.rpm_list         = self.load_item(seed_data, 'rpm_list')
         self.createrepo_flags = self.load_item(seed_data, 'createrepo_flags', '-c cache')
+        self.breed            = self.load_item(seed_data, 'breed')
         self.arch             = self.load_item(seed_data, 'arch')
         self.depth            = self.load_item(seed_data, 'depth', 2)
         self.yumopts          = self.load_item(seed_data, 'yumopts', {})
@@ -149,6 +153,9 @@ class Repo(item.Item):
         self.createrepo_flags = createrepo_flags
         return True
 
+    def set_breed(self,breed):
+        return utils.set_breed(self,breed)
+
     def set_arch(self,arch):
         """
         Override the arch used for reposync
@@ -182,6 +189,7 @@ class Repo(item.Item):
            'priority'         : self.priority,
            'rpm_list'         : self.rpm_list,
            'createrepo_flags' : self.createrepo_flags,
+           'breed'            : self.breed,
            'arch'             : self.arch,
            'parent'           : self.parent,
            'depth'            : self.depth,
@@ -194,6 +202,7 @@ class Repo(item.Item):
 
     def printable(self):
         buf =       _("repo             : %s\n") % self.name
+        buf = buf + _("breed            : %s\n") % self.breed
         buf = buf + _("arch             : %s\n") % self.arch
         buf = buf + _("createrepo_flags : %s\n") % self.createrepo_flags
         buf = buf + _("keep updated     : %s\n") % self.keep_updated
@@ -212,19 +221,10 @@ class Repo(item.Item):
         """
         return None
 
-    def is_rsync_mirror(self):
-        """
-        Returns True if this mirror is synchronized using rsync, False otherwise
-        """
-        lower = self.mirror.lower()
-        if lower.startswith("http://") or lower.startswith("ftp://") or lower.startswith("rhn://"):
-            return False
-        else:
-            return True
-
     def remote_methods(self):
         return {
             'name'             :  self.set_name,
+            'breed'            :  self.set_breed,
             'arch'             :  self.set_arch,
             'mirror-name'      :  self.set_name,
             'mirror'           :  self.set_mirror,
@@ -237,3 +237,154 @@ class Repo(item.Item):
             'mirror-locally'   :  self.set_mirror_locally
         }
 
+    def sync(self, repo_mirror, obj_sync):
+
+        """
+        Handle copying of http:// and ftp:// repos.
+        """
+
+        # warn about not having yum-utils.  We don't want to require it in the package because
+        # RHEL4 and RHEL5U0 don't have it.
+
+        if not os.path.exists("/usr/bin/reposync"):
+            raise CX(_("no /usr/bin/reposync found, please install yum-utils"))
+
+        cmd = ""                  # command to run
+        is_rhn = False            # RHN repositories require extra black magic
+        has_rpm_list = False      # flag indicating not to pull the whole repo
+
+        # detect cases that require special handling
+
+        if self.mirror.lower().startswith("rhn://"):
+            is_rhn = True
+        if self.rpm_list != "":
+            has_rpm_list = True
+
+        # create yum config file for use by reposync
+        dest_path = os.path.join(repo_mirror, self.name)
+        temp_path = os.path.join(repo_mirror, ".origin")
+        if not os.path.isdir(temp_path) and self.mirror_locally:
+            # FIXME: there's a chance this might break the RHN D/L case
+            os.makedirs(temp_path)
+         
+        # how we invoke yum-utils depends on whether this is RHN content or not.
+
+       
+
+        if not is_rhn:
+
+            # this is the simple non-RHN case.
+            # create the config file that yum will use for the copying
+
+            if self.mirror_locally:
+                temp_file = obj_sync.create_local_file(self, temp_path, output=False)
+
+            if not has_rpm_list and self.mirror_locally:
+                # if we have not requested only certain RPMs, use reposync
+                cmd = "/usr/bin/reposync %s --config=%s --repoid=%s --download_path=%s" % (obj_sync.rflags, temp_file, self.name, repo_mirror)
+                if self.arch != "":
+                    if self.arch == "x86":
+                       self.arch = "i386" # FIX potential arch errors
+                    if self.arch == "i386":
+                       # counter-intuitive, but we want the newish kernels too
+                       cmd = "%s -a i686" % (cmd)
+                    else:
+                       cmd = "%s -a %s" % (cmd, self.arch)
+                    
+                print _("- %s") % cmd
+
+            elif self.mirror_locally:
+
+                # create the output directory if it doesn't exist
+                if not os.path.exists(dest_path):
+                   os.makedirs(dest_path)
+
+                use_source = ""
+                if self.arch == "src":
+                    use_source = "--source"
+ 
+                # older yumdownloader sometimes explodes on --resolvedeps
+                # if this happens to you, upgrade yum & yum-utils
+                extra_flags = obj_sync.settings.yumdownloader_flags
+                cmd = "/usr/bin/yumdownloader %s %s -c %s --destdir=%s %s" % (extra_flags, use_source, temp_file, dest_path, " ".join(self.rpm_list))
+                print _("- %s") % cmd
+        else:
+
+            # this is the somewhat more-complex RHN case.
+            # NOTE: this requires that you have entitlements for the server and you give the mirror as rhn://$channelname
+            if not self.mirror_locally:
+                raise CX(_("rhn:// repos do not work with --mirror-locally=1"))
+
+            if has_rpm_list:
+                print _("- warning: --rpm-list is not supported for RHN content")
+            rest = self.mirror[6:] # everything after rhn://
+            cmd = "/usr/bin/reposync %s -r %s --download_path=%s" % (obj_sync.rflags, rest, repo_mirror)
+            if self.name != rest:
+                args = { "name" : self.name, "rest" : rest }
+                raise CX(_("ERROR: repository %(name)s needs to be renamed %(rest)s as the name of the cobbler repository must match the name of the RHN channel") % args)
+
+            if self.arch == "i386":
+                # counter-intuitive, but we want the newish kernels too
+                self.arch = "i686"
+
+            if self.arch != "":
+                cmd = "%s -a %s" % (cmd, self.arch)
+
+        # now regardless of whether we're doing yumdownloader or reposync
+        # or whether the repo was http://, ftp://, or rhn://, execute all queued
+        # commands here.  Any failure at any point stops the operation.
+
+        if self.mirror_locally:
+            rc = sub_process.call(cmd, shell=True)
+            if rc !=0:
+                raise CX(_("cobbler reposync failed"))
+
+        # some more special case handling for RHN.
+        # create the config file now, because the directory didn't exist earlier
+
+        if is_rhn:
+            temp_file = obj_sync.create_local_file(self, temp_path, output=False)
+
+        # now run createrepo to rebuild the index
+
+        if self.mirror_locally:
+            os.path.walk(dest_path, obj_sync.createrepo_walker, self)
+
+        # create the config file the hosts will use to access the repository.
+
+        obj_sync.create_local_file(self, dest_path)
+ 
+
+class RsyncRepo(Repo):
+
+    def sync(self, repo_mirror, obj_sync):
+
+        """
+        Handle copying of rsync:// and rsync-over-ssh repos.
+        """
+
+        if not self.mirror_locally:
+            raise CX(_("rsync:// urls must be mirrored locally, yum cannot access them directly"))
+
+        if self.rpm_list != "":
+            print _("- warning: --rpm-list is not supported for rsync'd repositories")
+        dest_path = os.path.join(repo_mirror, self.name)
+        spacer = ""
+        if not self.mirror.startswith("rsync://") and not self.mirror.startswith("/"):
+            spacer = "-e ssh"
+        if not self.mirror.endswith("/"):
+            self.mirror = "%s/" % self.mirror
+        cmd = "rsync -rltDv %s --delete --delete-excluded --exclude-from=/etc/cobbler/rsync.exclude %s %s" % (spacer, self.mirror, dest_path)       
+        print _("- %s") % cmd
+        rc = sub_process.call(cmd, shell=True)
+        if rc !=0:
+            raise CX(_("cobbler reposync failed"))
+        print _("- walking: %s") % dest_path
+        os.path.walk(dest_path, obj_sync.createrepo_walker, self)
+        obj_sync.create_local_file(self, dest_path)
+    
+class YumRepo(Repo):
+
+    def sync(self, repo_mirror, obj_sync):
+        raise CX(_("Trying to sync repo %s"%self))
+
