[Spacewalk-devel] [Fwd: 487566 - api/script - initial commit of snapshot script and mods to snapshot apis]

2009-04-08 Thread Miroslav Suchý




May I ask that with new API addition/change we bump minor number of 
web.apiversion in file web/conf/rhn_web.conf

And in Javadoc we write comment similar to:
 Available since API version 10.1

--
Miroslav Suchy
RHN Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] Commits should reference public bugzillas

2009-04-08 Thread Jan Pazdziora

Hello,

if you like me in the past committed a fix to Spacewalk repo
referencing bugzilla which is not public, you might find the following
code useful. Just add it to .git/hooks/commit-msg and do
chmod a+x .git/hooks/commit-msg.

bugzilla_id=$( perl -lne 'if (/^(\d+) -/) { print $1 } exit' $1)
if [ -n "$bugzilla_id" ] ; then
if GET 
"https://bugzilla.redhat.com/show_bug.cgi?id=$bugzilla_id&ctype=xml"; | grep -q 
'' ; then
echo "Bugzilla [$bugzilla_id] does not seem to be public. 
Aborting."
exit 1
fi
fi

-- 
Jan Pazdziora
Senior Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] Re: [Fwd: 487566 - api/script - initial commit of snapshot script and mods to snapshot apis]

2009-04-08 Thread Brad Buckingham

Miroslav Suchý wrote:


 



May I ask that with new API addition/change we bump minor number of 
web.apiversion in file web/conf/rhn_web.conf

And in Javadoc we write comment similar to:
 Available since API version 10.1


Mirek,

Thanks for the suggestion.  Sure, I'll commit a change today.

Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] Re: [Fwd: 487566 - api/script - initial commit of snapshot script and mods to snapshot apis]

2009-04-08 Thread Brad Buckingham

Brad Buckingham wrote:

Miroslav Suchý wrote:


 



May I ask that with new API addition/change we bump minor number of 
web.apiversion in file web/conf/rhn_web.conf

And in Javadoc we write comment similar to:
 Available since API version 10.1


Mirek,

Thanks for the suggestion.  Sure, I'll commit a change today.

Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Team,

I updated the API doclet that is used to generate our API docs to 
support the javadoc '@since' tag.  As a result, when adding a new API or 
modifying the signature/return of an API, if you add this tag, it will 
reflect the version in the generated API documentation.


For example, the following is the 'code' for the listSnapshotPackages API:
   /**
* list the packages for a given snapshot
* @param sessionKey key
* @param snapId snapshot id
* @return Set of packageNEvra objects
* @since 10.1
*
* @xmlrpc.doc List the packages associated with a snapshot.
* @xmlrpc.param #session_key()
* @xmlrpc.param #param("int", "snapId")
* @xmlrpc.returntype
*  #array()
* $PackageNevraSerializer
* #array_end()
*/

From this, the following API doc will get generated:

   Method: listSnapshotPackages
   Description:
   List the packages associated with a snapshot.

   Parameters:

   * string sessionKey
   * int snapId

   Returns:

   * array:
 o struct - package nvera
   + string "name"
   + string "epoch"
   + string "version"
   + string "release"
   + string "arch"

Available since: 10.1

cheers,
Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] Re: [Fwd: 487566 - api/script - initial commit of snapshot script and mods to snapshot apis]

2009-04-08 Thread Jason Dobies

Brad Buckingham wrote:

Brad Buckingham wrote:

Miroslav Suchý wrote:


 



May I ask that with new API addition/change we bump minor number of 
web.apiversion in file web/conf/rhn_web.conf

And in Javadoc we write comment similar to:
 Available since API version 10.1


Mirek,

Thanks for the suggestion.  Sure, I'll commit a change today.

Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Team,

I updated the API doclet that is used to generate our API docs to 
support the javadoc '@since' tag.  As a result, when adding a new API or 
modifying the signature/return of an API, if you add this tag, it will 
reflect the version in the generated API documentation.


For example, the following is the 'code' for the listSnapshotPackages API:
   /**
* list the packages for a given snapshot
* @param sessionKey key
* @param snapId snapshot id
* @return Set of packageNEvra objects
* @since 10.1
*
* @xmlrpc.doc List the packages associated with a snapshot.
* @xmlrpc.param #session_key()
* @xmlrpc.param #param("int", "snapId")
* @xmlrpc.returntype
*  #array()
* $PackageNevraSerializer
* #array_end()
*/

 From this, the following API doc will get generated:

   Method: listSnapshotPackages
   Description:
   List the packages associated with a snapshot.

   Parameters:

   * string sessionKey
   * int snapId

   Returns:

   * array:
 o struct - package nvera
   + string "name"
   + string "epoch"
   + string "version"
   + string "release"
   + string "arch"

Available since: 10.1

cheers,
Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Very cool. Where does the actual number "10.1" come from? Is it 
incremented for each Spacewalk release? How does that fit into potential 
changes to the API now in terms of the version number in Vader v. 
Spacewalk? Granted, the last scenario probably shouldn't be happening, 
but figured I'd throw it out there.


--
Jason Dobies
RHN Satellite / Spacewalk
RHCE# 805008743336126
Freenode: jdob @ #spacewalk #spacewalk-devel

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] Re: [Fwd: 487566 - api/script - initial commit of snapshot script and mods to snapshot apis]

2009-04-08 Thread Brad Buckingham

Jason Dobies wrote:

Brad Buckingham wrote:

Brad Buckingham wrote:

Miroslav Suchý wrote:


 



May I ask that with new API addition/change we bump minor number of 
web.apiversion in file web/conf/rhn_web.conf

And in Javadoc we write comment similar to:
 Available since API version 10.1


Mirek,

Thanks for the suggestion.  Sure, I'll commit a change today.

Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Team,

I updated the API doclet that is used to generate our API docs to 
support the javadoc '@since' tag.  As a result, when adding a new API 
or modifying the signature/return of an API, if you add this tag, it 
will reflect the version in the generated API documentation.


For example, the following is the 'code' for the listSnapshotPackages 
API:

   /**
* list the packages for a given snapshot
* @param sessionKey key
* @param snapId snapshot id
* @return Set of packageNEvra objects
* @since 10.1
*
* @xmlrpc.doc List the packages associated with a snapshot.
* @xmlrpc.param #session_key()
* @xmlrpc.param #param("int", "snapId")
* @xmlrpc.returntype
*  #array()
* $PackageNevraSerializer
* #array_end()
*/

 From this, the following API doc will get generated:

   Method: listSnapshotPackages
   Description:
   List the packages associated with a snapshot.

   Parameters:

   * string sessionKey
   * int snapId

   Returns:

   * array:
 o struct - package nvera
   + string "name"
   + string "epoch"
   + string "version"
   + string "release"
   + string "arch"

Available since: 10.1

cheers,
Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Very cool. Where does the actual number "10.1" come from? Is it 
incremented for each Spacewalk release? How does that fit into 
potential changes to the API now in terms of the version number in 
Vader v. Spacewalk? Granted, the last scenario probably shouldn't be 
happening, but figured I'd throw it out there.


Just a quick reply.  A few months ago, web.apiversion was added to the 
/etc/rhn/default/rhn_web.conf.  The initial value given to that was 
10.0.  This API version is intended to be independent/separate from the 
Spacewalk version, hence the reason a value such as 10.0 was chosen.


My understanding is that the intent is to update this version under the 
following scenarios:
1. bump major value on each Spacewalk version (so in Spacewalk 0.6, we 
should bump to 11.0)
2. bump the minor version as we add new APIs or alter the 
signature/return value of an API


Folks, please let me know if this is not aligned with previous thoughts.

Unfortunately, as Mirek pointed out this morning, we have not done a 
very good job at tagging APIs as the are introduced or updating this 
version when those changes occur.  (I know I am guilty of that, but hope 
to improve :) )


Hope this helps,
Brad

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] Can someone review/add script

2009-04-08 Thread Pradeep Kilambi

Pradeep Kilambi wrote:

Cliff wrote:

https://bugzilla.redhat.com/show_bug.cgi?id=146192

The above public satellite bug has a script attached to it that is 
GPL'd and does signing and push of rpms into a Satellite/Spacewalk 
server.


Can someone review it and add into spacewalk git if we feel it will 
be benefit to other users/admins to have available.


Cliff

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


I'll review and add my comments to the bug.

Thanks,
~ Prad




Done. I've reviewed and tested the above script. Although the script is 
needlessly complex for what its doing, since we dont have a script that 
has similar functionality, I decided to add it to our repo.


I've put it under spacewalk/scripts.

Thanks,
~ Prad.

--
--
Pradeep Kilambi
RHN Satellite Engineering
pkila...@redhat.com
Phone: +1 919 754 4285
RHCE # 805008680430554


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel