On 01/22/2014 12:18 PM, Johannes Renner wrote:
Hello,
The SUSE Studio API will no longer process requests via unencrypted HTTP after
Jan 2014, see here:
http://blog.susestudio.com/2013/12/coming-soon-https-only-on-suse-studio.html
Therefore attached is a patch to change the default endpoint to use SSL.
Following up on this issue, here is two more related patches: One is to update
the specfile in spec-tree in order to build a more recent version of the client
library and another one to make the spacewalk code compile against that version.
Note that the integration part will work with the old lib as well since we don't
use the default endpoint that comes with the library, but we rather set it from
within spacewalk. I would still recommend to update the library anyways.
Thanks and regards,
Johannes
--
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
>From e64a4b53a4d3bbd04af4cbe226753223d4e2cdba Mon Sep 17 00:00:00 2001
From: Johannes Renner <jren...@suse.de>
Date: Wed, 5 Feb 2014 11:55:17 +0100
Subject: [PATCH 1/2] Update susestudio-java-client spec file for building
version 0.1.4
---
spec-tree/susestudio-java-client/susestudio-java-client.spec | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/spec-tree/susestudio-java-client/susestudio-java-client.spec b/spec-tree/susestudio-java-client/susestudio-java-client.spec
index 1965cb0..99ca9de 100644
--- a/spec-tree/susestudio-java-client/susestudio-java-client.spec
+++ b/spec-tree/susestudio-java-client/susestudio-java-client.spec
@@ -1,7 +1,7 @@
#
# spec file for package susestudio-java-client
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuremberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuremberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,14 +12,11 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
%define third_party_jars simple-xml
Name: susestudio-java-client
Summary: Java client library for SUSE Studio
-Version: 0.1.2
+Version: 0.1.4
Release: 2%{?dist}
License: MIT
Group: Development/Libraries/Java
@@ -46,7 +43,7 @@ rm lib/*.jar
build-jar-repository -p lib/ %third_party_jars
%build
-ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5
+ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 dist-jar
%install
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
--
1.8.5.3
>From 47fbff436a823da8c629f37df39bff7bd690f222 Mon Sep 17 00:00:00 2001
From: Johannes Renner <jren...@suse.de>
Date: Wed, 5 Feb 2014 11:56:53 +0100
Subject: [PATCH 2/2] Patch code to build against susestudio-java-client
version 0.1.4
---
java/code/src/com/redhat/rhn/domain/image/Image.java | 6 +++---
.../com/redhat/rhn/frontend/action/renderers/ImagesRenderer.java | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/java/code/src/com/redhat/rhn/domain/image/Image.java b/java/code/src/com/redhat/rhn/domain/image/Image.java
index a3ad87c..47997d9 100644
--- a/java/code/src/com/redhat/rhn/domain/image/Image.java
+++ b/java/code/src/com/redhat/rhn/domain/image/Image.java
@@ -26,7 +26,7 @@ public class Image extends BaseDto implements Comparable<Image> {
private String name;
private String version;
private String arch;
- private String imageSize;
+ private int imageSize;
private String imageType;
private String downloadUrl;
private String editUrl;
@@ -100,7 +100,7 @@ public class Image extends BaseDto implements Comparable<Image> {
* Get the image size.
* @return image size
*/
- public String getImageSize() {
+ public int getImageSize() {
return this.imageSize;
}
@@ -108,7 +108,7 @@ public class Image extends BaseDto implements Comparable<Image> {
* Set the image size.
* @param imageSizeIn image size
*/
- public void setImageSize(String imageSizeIn) {
+ public void setImageSize(int imageSizeIn) {
this.imageSize = imageSizeIn;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/renderers/ImagesRenderer.java b/java/code/src/com/redhat/rhn/frontend/action/renderers/ImagesRenderer.java
index dea77e7..1a42d18 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/renderers/ImagesRenderer.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/renderers/ImagesRenderer.java
@@ -15,7 +15,6 @@
package com.redhat.rhn.frontend.action.renderers;
-import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -34,6 +33,7 @@ import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.listview.PageControl;
import com.redhat.rhn.frontend.taglibs.list.ListTagHelper;
import com.suse.studio.client.SUSEStudio;
+import com.suse.studio.client.exception.SUSEStudioException;
import com.suse.studio.client.model.Appliance;
import com.suse.studio.client.model.Build;
@@ -83,7 +83,7 @@ public class ImagesRenderer extends BaseFragmentRenderer {
throw re;
}
}
- catch (IOException e) {
+ catch (SUSEStudioException e) {
logger.error(e.getMessage());
request.setAttribute(ATTRIB_ERROR_MSG, "images.message.error.connection");
}
@@ -95,7 +95,7 @@ public class ImagesRenderer extends BaseFragmentRenderer {
* @return list of {@link Image} objects
*/
private List<Image> getImages(User user, HttpServletRequest request)
- throws IOException {
+ throws SUSEStudioException {
List<Appliance> appliances = new ArrayList<Appliance>();
// Lookup credentials and url
--
1.8.5.3
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel