summaryrefslogtreecommitdiff
path: root/TAO/CIAO/ciao/Deployment.idl
blob: 089bc145c9de97f9f1736b931d2a2f984fa69fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
// $Id$
#ifndef DEPLOYMENT_IDL
#define DEPLOYMENT_IDL

#include "Deployment_Data.idl"
#include "Packaging_Data.idl"
#include "Target_Data.idl"
#include "ServerResources.idl"

module Deployment {

  exception InvalidProperty {
    string name;
    string reason;
  };

  exception NameExists {
  };

  exception PackageError {
    string source;
    string reason;
  };

  exception NoSuchName {
  };

  exception LastConfiguration {
  };

  exception InvalidReference {
  };

  // Below exception types are CIAO specific
  exception PlanNotExist {
  };

  // CIAO specific struct type used for shared component management
  // mapping the name of component to its plan_uuid
  struct ComponentPlan
  {
    string name;
    string plan_uuid;
  };

  typedef sequence < ComponentPlan > ComponentPlans;

  interface ApplicationManager {
    Application startLaunch (in Properties configProperty,
                             out Connections providedReference,
                             in boolean start)
      raises (ResourceNotAvailable, StartError, InvalidProperty);
    void destroyApplication (in Application app)
      raises (StopError);
  };

  typedef sequence < Application > Applications;

  /// CIAO 's DomainApplicationManager interface differs spec-defined interface
  /// in the same that it also integrates the spec-defined interface for
  /// DomainApplication into itself
  interface DomainApplicationManager
  {
    DeploymentPlan getPlan ();

    /// CIAO specific version of startLaunch implementation, this one
    /// differs with spec-defined operation in the sense that it doesn't
    /// return DomainApplication object reference.
    void startLaunch (in Properties configProperty, in boolean start)
      raises (ResourceNotAvailable, StartError, InvalidProperty);

    void finishLaunch (in boolean start,
                       in boolean is_ReDAC)
      raises (StartError, InvalidConnection);

    void start ()
      raises (StartError);

    /// CIAO specific extention
    /// Fetch NodeApplication based on the given node name
    NodeApplication get_node_app (in string node_name)
      raises (NoSuchName);

    /// CIAO speicifc extension, it differs with the spec defined one
    /// for no input parameter.
    void destroyApplication ()
      raises (StopError);

    /// CIAO specific extension to destroy NodeApplicationManager
    void destroyManager ()
      raises (StopError);

    /// CIAO specific extension
    /// Perform the actual redeployment and reconfiguration on the dommain level.
    void perform_redeployment (in DeploymentPlan new_plan)
      raises (PlanError,
              InstallationFailure,
              UnknownImplId,
              ImplEntryPointNotFound,
              InvalidConnection,
              InvalidProperty,
              ::Components::RemoveFailure);
  };

  typedef sequence < DomainApplicationManager > DomainApplicationManagers;

  interface ExecutionManager {
    DomainApplicationManager preparePlan (in DeploymentPlan plan,
                                          in boolean commitResources)
      raises (ResourceNotAvailable, PlanError, StartError);

    DomainApplicationManagers getManagers ();

    DomainApplicationManager getManager (in string plan_uuid)
      raises (PlanNotExist);

    void destroyManager (in DomainApplicationManager manager)
      raises (StopError);

    /// CIAO specific extention
    /// Destroy ApplicatioManagers by plan_uuid, the unique semantics of this
    /// operation lies in the fact that if some components are
    /// still up and running, then the ApplicationManagers won't be destroyed.
    void destroyManagerByPlan (in string plan_uuid)
      raises (StopError);

    /// CIAO specific extention
    /// "Get" operation, return the DeploymentPlan
    DeploymentPlan getPlan (in string plan_uuid);

    /// CIAO specific operation to handle dynamic system redeployment
    /// and reconfiguration
    /// This operation could handle dynamic redeployment, and this
    /// is the operation exposed to clients directly. Other
    /// "perform_redeployment" operation defined on DAM and NA
    /// are implementaion details within DAnCE.
    void perform_redeployment (in DeploymentPlan new_plan)
      raises (PlanError,
              InstallationFailure,
              UnknownImplId,
              ImplEntryPointNotFound,
              InvalidConnection,
              InvalidProperty,
              ::Components::RemoveFailure);
  };

  interface Logger {
  };

  interface NodeApplicationManager :
    ApplicationManager
  {
    /// CIAO specific operation to handle dynamic system redeployment
    /// and reconfiguration
    /// This operation could handle dynamic redeployment for
    /// a node-level deployment plan within a node
    Application perform_redeployment (in Properties configProperty,
                                      out Connections providedReference,
                                      in boolean start)
      raises (PlanError,
              InstallationFailure,
              UnknownImplId,
              ImplEntryPointNotFound,
              InvalidConnection,
              InvalidProperty,
              ::Components::RemoveFailure);

    /// CIAO specific operation to reset deployment plan
    void reset_plan (in DeploymentPlan plan);

    /// CIAO speicfic operation to set the information of
    /// "shared components" (through NodeManager)
    void set_shared_components (in ComponentPlans components);
  };

  interface NodeManager {
    void joinDomain (in Domain ciao_domain,
                     in TargetManager manager,
                     in Logger log);

    void leaveDomain ();

    NodeApplicationManager preparePlan (in DeploymentPlan plan)
      raises (StartError, PlanError);

    void destroyManager (in NodeApplicationManager appManager)
      raises (StopError, InvalidReference);

    /// CIAO specific extension
    /// Destroy the NAM and all the associated NAs with this child_plan
    /// We can guarantee that the input DeploymentPlan is valid, since it
    /// is fetched from the cached DeploymentPlan of DAM, which has been
    /// validated before.
    void destroyPlan (in DeploymentPlan plan)
      raises (StopError);

    /// CIAO specific extension
    /// Get all the shared components installed in this node
    ComponentPlans get_shared_components ();
  };

  interface RepositoryManager {
    void installPackage (in string installationName, in string location)
      raises (NameExists, PackageError);
    void createPackage (in string installationName,
                        in PackageConfiguration package,
                        in string baseLocation,
                        in boolean replace)
      raises (NameExists, PackageError);
    PackageConfiguration findPackageByName (in string name)
      raises (NoSuchName);
    PackageConfiguration findPackageByUUID (in string UUID)
      raises (NoSuchName);
    ::CORBA::StringSeq findNamesByType (in string type);
    ::CORBA::StringSeq getAllNames ();
    ::CORBA::StringSeq getAllTypes ();
    void deletePackage (in string installationName)
      raises (NoSuchName);
  };


//***************************************new_RepositoryManager ONWARDS*****************************************

typedef sequence<octet> Artifact;
  typedef sequence<octet> Package;

  exception NoPlan {
  };

  enum Platform {
    Win32,
    Unix,
    Linux,
    Solaris,
    Vxworks,
    UNDEF
  };

  struct Implementation
  {
    Platform the_platform;
    string name;
    Artifact the_implementation;
  };

  typedef sequence<Implementation> Implementations;

  interface new_RepositoryManager
  {
    void installPackage (in string installationName,
                         in Package the_package,
                         in boolean replace)
      raises (NameExists, PackageError);

    DeploymentPlan  retrievePlan (in string packageName)
      raises (NoPlan);

    Package findPackageByName (in string name)
      raises (NoSuchName);

    Implementation findImplementationByName (in string implementation_name,
                                             in string package_name)
      raises (NoSuchName);

    Package findPackageByUUID (in string UUID)
      raises (NoSuchName);

    Implementation findImplementationByUUID (in string UUID)
      raises (NoSuchName);

    //::CORBA::StringSeq findNamesByType (in string type);
    //::CORBA::StringSeq getAllTypes ();

    ::CORBA::StringSeq getAllPackageNames ();

    void deletePackage (in string installationName)
      raises (NoSuchName);
  };
};

#endif /* DEPLOYMENT_IDL */