Permalink
Browse files

service-api/ from 2009-01-10

  • Loading branch information...
1 parent 0562f3b commit 7147f2e237374111bd4f7303046d7464165f958b @timf timf committed Sep 30, 2009
Showing with 5,080 additions and 0 deletions.
  1. +7 −0 service-api/java/source/.ant-targets-build.xml
  2. +14 −0 service-api/java/source/build.properties
  3. +164 −0 service-api/java/source/build.xml
  4. +32 −0 service-api/java/source/doc/style.css
  5. BIN service-api/java/source/lib-compile/commons-logging.jar
  6. BIN service-api/java/source/lib-compile/log4j-1.2.15.jar
  7. +7 −0 service-api/java/source/lib-compile/notes.txt
  8. BIN service-api/java/source/lib/cglib-nodep-2.1_3.jar
  9. BIN service-api/java/source/lib/spring.jar
  10. +33 −0 service-api/java/source/src/org/nimbustools/api/NimbusModule.java
  11. +31 −0 service-api/java/source/src/org/nimbustools/api/_repr/_Advertised.java
  12. +34 −0 service-api/java/source/src/org/nimbustools/api/_repr/_Caller.java
  13. +46 −0 service-api/java/source/src/org/nimbustools/api/_repr/_CreateRequest.java
  14. +27 −0 service-api/java/source/src/org/nimbustools/api/_repr/_CreateResult.java
  15. +25 −0 service-api/java/source/src/org/nimbustools/api/_repr/_CustomizationRequest.java
  16. +27 −0 service-api/java/source/src/org/nimbustools/api/_repr/_ShutdownTasks.java
  17. +25 −0 service-api/java/source/src/org/nimbustools/api/_repr/_Usage.java
  18. +30 −0 service-api/java/source/src/org/nimbustools/api/_repr/ctx/_Context.java
  19. +11 −0 service-api/java/source/src/org/nimbustools/api/_repr/ctx/package.html
  20. +10 −0 service-api/java/source/src/org/nimbustools/api/_repr/package.html
  21. +27 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_Kernel.java
  22. +33 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_NIC.java
  23. +25 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_RequiredVMM.java
  24. +28 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_ResourceAllocation.java
  25. +28 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_Schedule.java
  26. +25 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_State.java
  27. +40 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_VM.java
  28. +34 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/_VMFile.java
  29. +11 −0 service-api/java/source/src/org/nimbustools/api/_repr/vm/package.html
  30. +153 −0 service-api/java/source/src/org/nimbustools/api/brain/BreathOfLife.java
  31. +45 −0 service-api/java/source/src/org/nimbustools/api/brain/Logging.java
  32. +69 −0 service-api/java/source/src/org/nimbustools/api/brain/Main.java
  33. +36 −0 service-api/java/source/src/org/nimbustools/api/brain/ModuleLocator.java
  34. +34 −0 service-api/java/source/src/org/nimbustools/api/brain/NimbusLog.java
  35. +16 −0 service-api/java/source/src/org/nimbustools/api/brain/package.html
  36. +33 −0 service-api/java/source/src/org/nimbustools/api/defaults/brain/DefaultModuleLocator.java
  37. +13 −0 service-api/java/source/src/org/nimbustools/api/defaults/brain/package.html
  38. +72 −0 service-api/java/source/src/org/nimbustools/api/defaults/defaults.xml
  39. +7 −0 service-api/java/source/src/org/nimbustools/api/defaults/log4j.properties
  40. +101 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr.xml
  41. +142 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultAdvertised.java
  42. +74 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultCaller.java
  43. +210 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultCreateRequest.java
  44. +80 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultCreateResult.java
  45. +54 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultCustomizationRequest.java
  46. +75 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultReprFactory.java
  47. +57 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultShutdownTasks.java
  48. +55 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/DefaultUsage.java
  49. +56 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/ctx/DefaultContext.java
  50. +12 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/ctx/package.html
  51. +13 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/package.html
  52. +69 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultKernel.java
  53. +147 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultNIC.java
  54. +70 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultRequiredVMM.java
  55. +97 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultResourceAllocation.java
  56. +94 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultSchedule.java
  57. +96 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultState.java
  58. +164 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultVM.java
  59. +119 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultVMFile.java
  60. +13 −0 service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/package.html
  61. +226 −0 service-api/java/source/src/org/nimbustools/api/defaults/services/rm/DefaultBasicLegality.java
  62. +272 −0 service-api/java/source/src/org/nimbustools/api/defaults/services/rm/DefaultManager.java
  63. +11 −0 service-api/java/source/src/org/nimbustools/api/defaults/services/rm/package.html
  64. +20 −0 service-api/java/source/src/org/nimbustools/api/package.html
  65. +34 −0 service-api/java/source/src/org/nimbustools/api/repr/Advertised.java
  66. +41 −0 service-api/java/source/src/org/nimbustools/api/repr/Caller.java
  67. +40 −0 service-api/java/source/src/org/nimbustools/api/repr/CannotTranslateException.java
  68. +53 −0 service-api/java/source/src/org/nimbustools/api/repr/CreateRequest.java
  69. +26 −0 service-api/java/source/src/org/nimbustools/api/repr/CreateResult.java
  70. +23 −0 service-api/java/source/src/org/nimbustools/api/repr/CustomizationRequest.java
  71. +66 −0 service-api/java/source/src/org/nimbustools/api/repr/ReprFactory.java
  72. +25 −0 service-api/java/source/src/org/nimbustools/api/repr/ShutdownTasks.java
  73. +23 −0 service-api/java/source/src/org/nimbustools/api/repr/Usage.java
  74. +28 −0 service-api/java/source/src/org/nimbustools/api/repr/ctx/Context.java
  75. +11 −0 service-api/java/source/src/org/nimbustools/api/repr/ctx/package.html
  76. +8 −0 service-api/java/source/src/org/nimbustools/api/repr/package.html
  77. +25 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/Kernel.java
  78. +35 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/NIC.java
  79. +23 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/RequiredVMM.java
  80. +37 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/ResourceAllocation.java
  81. +26 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/Schedule.java
  82. +34 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/State.java
  83. +34 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/VM.java
  84. +35 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/VMFile.java
  85. +11 −0 service-api/java/source/src/org/nimbustools/api/repr/vm/package.html
  86. +25 −0 service-api/java/source/src/org/nimbustools/api/services/ctx/ContextBroker.java
  87. +40 −0 service-api/java/source/src/org/nimbustools/api/services/ctx/ContextBrokerException.java
  88. +8 −0 service-api/java/source/src/org/nimbustools/api/services/ctx/package.html
  89. +31 −0 service-api/java/source/src/org/nimbustools/api/services/metadata/MetadataServer.java
  90. +66 −0 service-api/java/source/src/org/nimbustools/api/services/metadata/MetadataServerException.java
  91. +37 −0 ...pi/java/source/src/org/nimbustools/api/services/metadata/MetadataServerUnauthorizedException.java
  92. +8 −0 service-api/java/source/src/org/nimbustools/api/services/package.html
  93. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/AuthorizationException.java
  94. +43 −0 service-api/java/source/src/org/nimbustools/api/services/rm/BasicLegality.java
  95. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/CoSchedulingException.java
  96. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/CreationException.java
  97. +29 −0 service-api/java/source/src/org/nimbustools/api/services/rm/DestructionCallback.java
  98. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/DoesNotExistException.java
  99. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/ManageException.java
  100. +174 −0 service-api/java/source/src/org/nimbustools/api/services/rm/Manager.java
  101. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/MetadataException.java
  102. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/OperationDisabledException.java
  103. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/ResourceRequestDeniedException.java
  104. +40 −0 service-api/java/source/src/org/nimbustools/api/services/rm/SchedulingException.java
  105. +31 −0 service-api/java/source/src/org/nimbustools/api/services/rm/StateChangeCallback.java
  106. +11 −0 service-api/java/source/src/org/nimbustools/api/services/rm/package.html
@@ -0,0 +1,7 @@
+checkjdk
+clean
+compile
+dist
+init
+jar
+javadoc
@@ -0,0 +1,14 @@
+nimbus.service.api.print-noun=Nimbus Services Bridge (RM API)
+nimbus.service.api.build.dir=build
+nimbus.service.api.build.dest=build/classes
+nimbus.service.api.src.dir=src
+nimbus.service.api.docs.dir=doc
+nimbus.service.api.javadocs.dir=doc/javadoc
+nimbus.service.api.lib.dir=lib
+nimbus.service.api.lib-compile.dir=lib-compile
+nimbus.service.api.dist.dir=dist
+nimbus.service.api.jar.name=nimbus-service-api.jar
+nimbus.service.api.javadoc.css=doc/style.css
+
+# you can override this in ~/nimbus.build.properties
+nimbus.java.compilerarg=-nowarn
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+
+<project default="dist" basedir="." name="Nimbus Service APIs">
+
+ <description>Nimbus Service APIs</description>
+
+ <!-- load user nimbus.build.properties file, if it exists -->
+ <property file="${user.home}/nimbus.build.properties"/>
+
+ <!-- load defaults from colocated build.properties file -->
+ <property file="build.properties"/>
+
+
+ <!-- *******************************************************************
+ CHECK MINIMUM JDK
+ ******************************************************************* -->
+
+ <target name="checkjdk">
+ <available property="jdk1.4+" classname="java.lang.CharSequence"/>
+ <fail message="Aborting: determined you are not building with >= JDK 1.4"
+ unless="jdk1.4+" />
+ </target>
+
+
+ <!-- *******************************************************************
+ INITIALIZE
+ ******************************************************************* -->
+
+ <target name="init" depends="checkjdk">
+ <mkdir dir="${nimbus.service.api.build.dir}"/>
+ <mkdir dir="${nimbus.service.api.build.dest}"/>
+ <mkdir dir="${nimbus.service.api.dist.dir}"/>
+ </target>
+
+
+ <!-- *******************************************************************
+ COMPILATION
+ ******************************************************************* -->
+
+ <path id="nimbus.service.api.classpath">
+ <fileset dir="${nimbus.service.api.lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${nimbus.service.api.lib-compile.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="compile" depends="init">
+
+ <javac srcdir="${nimbus.service.api.src.dir}"
+ destdir="${nimbus.service.api.build.dest}"
+ debug="on"
+ classpathref="nimbus.service.api.classpath">
+
+ <include name="**/*.java"/>
+ <compilerarg value="${nimbus.java.compilerarg}" />
+
+ </javac>
+
+ <copy todir="${nimbus.service.api.build.dest}" >
+
+ <fileset dir="${nimbus.service.api.src.dir}"
+ includes="**/*.properties" />
+
+ <fileset dir="${nimbus.service.api.src.dir}"
+ includes="**/*.xml" />
+
+ <fileset dir="${nimbus.service.api.src.dir}"
+ includes="**/*.txt" />
+ </copy>
+
+ </target>
+
+
+ <!-- *******************************************************************
+ CREATE ARCHIVE FILE
+ ******************************************************************* -->
+
+ <target name="jar" depends="compile">
+ <jar destfile="${nimbus.service.api.dist.dir}/${nimbus.service.api.jar.name}"
+ basedir="${nimbus.service.api.build.dest}"/>
+ </target>
+
+
+ <!-- *******************************************************************
+ CLEAN
+ ******************************************************************* -->
+
+ <target name="clean">
+ <delete dir="${nimbus.service.api.build.dir}"/>
+ <delete dir="${nimbus.service.api.dist.dir}"/>
+ <delete dir="${nimbus.service.api.javadocs.dir}"/>
+ <echo message="Cleaned: ${basedir}" />
+ </target>
+
+
+ <!-- *******************************************************************
+ CREATE DISTRIBUTION
+ ******************************************************************* -->
+
+ <target name="dist">
+ <echo message="**** Module: ${basedir}" />
+ <echo>Building: ${nimbus.service.api.print-noun}</echo>
+ <antcall target="jar" />
+ <echo>Built: ${nimbus.service.api.print-noun}
+ </echo>
+ </target>
+
+
+ <!-- *******************************************************************
+ CREATE DOCUMENTATION
+ ******************************************************************* -->
+
+ <target name="javadoc">
+
+ <delete dir="${nimbus.service.api.javadocs.dir}"/>
+ <mkdir dir="${nimbus.service.api.javadocs.dir}"/>
+
+ <javadoc destdir="${nimbus.service.api.javadocs.dir}"
+ linksource="true"
+ author="false"
+ version="false"
+ use="true"
+ stylesheetfile="${nimbus.service.api.javadoc.css}"
+ windowtitle="Nimbus Services Bridge (RM API)">
+
+ <packageset dir="src" defaultexcludes="yes">
+ <include name="org/nimbustools/**"/>
+ </packageset>
+
+ <doctitle><![CDATA[<h1>Nimbus Services Bridge (RM API) - <i>TP2.2</i></h1>]]></doctitle>
+
+ <bottom>
+ <![CDATA[<i>Release: TP2.2</i> - For more information, see
+ <a href="http://www.nimbustools.org"
+ target="_blank">http://www.nimbustools.org</a>]]></bottom>
+
+ <group title="Action Interfaces">
+ <package name="org.nimbustools.api.services.*" />
+ <package name="org.nimbustools.api" />
+ <package name="org.nimbustools.api.services" />
+ </group>
+
+ <group title="Representation Interfaces">
+ <package name="org.nimbustools.api.repr" />
+ <package name="org.nimbustools.api.repr.*" />
+ </group>
+
+ <group title="Instantiation / IoC">
+ <package name="org.nimbustools.api.brain" />
+ </group>
+
+ <group title="Read/Write Representation Interfaces">
+ <package name="org.nimbustools.api._repr" />
+ <package name="org.nimbustools.api._repr.*" />
+ </group>
+
+ <group title="Default Implementations">
+ <package name="org.nimbustools.api.defaults.*" />
+ </group>
+ </javadoc>
+ </target>
+</project>
@@ -0,0 +1,32 @@
+/* Javadoc style sheet */
+
+/* Define colors, fonts and other style attributes here to override the defaults */
+
+/* Page background color */
+body {
+ background-color: #FFFFFF;
+ color:#000000;
+}
+
+/* Headings */
+h1 { font-size: 145% }
+
+/* Table colors */
+.TableHeadingColor { background: #FFFFCC; color:#000000 }
+.TableSubHeadingColor { background: #FFFFCC; color:#000000 }
+.TableRowColor { background: #FFFFFF; color:#000000 } /* White */
+
+/* Font used in left-hand frame lists */
+.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
+.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
+.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
+
+/* Navigation bar fonts and colors */
+.NavBarCell1 { background-color:#ffffff; color:#000000} /* Light mauve */
+.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */
+.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}
+.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}
+
+.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
+.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
+
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
+The package will run without these libraries on the classpath but they are
+needed for compiling (and for running the Main demo).
+
+Class comment from org.nimbustools.api.brain.Logging:
+
+ Hides logging dependencies, squelches the (very few) debug statements if
+ commons logging is not in the classpath.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,33 @@
+/*
+ * Copyright 1999-2008 University of Chicago
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.nimbustools.api;
+
+public interface NimbusModule {
+
+ // -------------------------------------------------------------------------
+ // AUXILIARY
+ // -------------------------------------------------------------------------
+
+ /**
+ * This may or may not be called around instantiation time to log
+ * advisory information.
+ *
+ * @return anything you want, or null
+ */
+ public String report();
+
+}
@@ -0,0 +1,31 @@
+/*
+ * Copyright 1999-2008 University of Chicago
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.nimbustools.api._repr;
+
+import org.nimbustools.api.repr.Advertised;
+
+public interface _Advertised extends Advertised {
+
+ public void setDefaultRunningTimeSeconds(int defaultRunningTime);
+ public void setMaximumRunningTimeSeconds(int maximumRunningTime);
+ public void setCpuArchitectureName(String cpuArchitectureName);
+ public void setVmmVersions(String[] vmmVersions);
+ public void setVmm(String vmm);
+ public void setNetworkNames(String[] networkNames);
+ public void setMaxGroupSize(int maxGroupSize);
+ public void setChargeGranularity(int chargeGranularity);
+}
@@ -0,0 +1,34 @@
+/*
+ * Copyright 1999-2008 University of Chicago
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.nimbustools.api._repr;
+
+import org.nimbustools.api.repr.Caller;
+
+import javax.security.auth.Subject;
+
+public interface _Caller extends Caller {
+
+ /**
+ * @param identity if null, then assumed to be superuser
+ */
+ public void setIdentity(String identity);
+
+ /**
+ * @param subject from JAAS etc (presumably), may be null
+ */
+ public void setSubject(Subject subject);
+}
@@ -0,0 +1,46 @@
+/*
+ * Copyright 1999-2008 University of Chicago
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy
+ * of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.nimbustools.api._repr;
+
+import org.nimbustools.api.repr.ctx.Context;
+import org.nimbustools.api.repr.vm.Kernel;
+import org.nimbustools.api.repr.vm.NIC;
+import org.nimbustools.api.repr.vm.RequiredVMM;
+import org.nimbustools.api.repr.vm.ResourceAllocation;
+import org.nimbustools.api.repr.vm.Schedule;
+import org.nimbustools.api.repr.vm.VMFile;
+import org.nimbustools.api.repr.CreateRequest;
+import org.nimbustools.api.repr.CustomizationRequest;
+
+public interface _CreateRequest extends CreateRequest {
+
+ public void setName(String name);
+ public void setVMFiles(VMFile[] vmFiles);
+ public void setRequestedNics(NIC[] requested);
+ public void setRequestedSchedule(Schedule requested);
+ public void setCoScheduleID(String id);
+ public void setCoScheduleDone(boolean done);
+ public void setCoScheduleMember(boolean member);
+ public void setRequestedRA(ResourceAllocation requested);
+ public void setRequiredVMM(RequiredVMM requiredVMM);
+ public void setRequestedKernel(Kernel kernel);
+ public void setCustomizationRequests(CustomizationRequest[] requests);
+ public void setShutdownType(String type);
+ public void setInitialStateRequest(String state);
+ public void setContext(Context context);
+ public void setMdUserData(String mdUserData);
+}
Oops, something went wrong.

0 comments on commit 7147f2e

Please sign in to comment.