Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Toshio Koide
2014-10-20 19:34:21 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
485b478c793ab5e3c89049e4b232d9576bd87d73
485b478c
1 parent
2fcfde9f
Update resource manager API and objects.
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
135 additions
and
22 deletions
core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceAllocation.java
core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceRequest.java
core/api/src/main/java/org/onlab/onos/net/resource/Lambda.java
core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceAllocation.java
core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceRequest.java
core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceAllocations.java
core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceRequest.java
core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java
core/api/src/main/java/org/onlab/onos/net/resource/ResourceAllocation.java
core/api/src/main/java/org/onlab/onos/net/resource/ResourceId.java
core/api/src/main/java/org/onlab/onos/net/resource/ResourceRequest.java
core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceAllocation.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
/**
* Representation of allocated bandwidth resource.
*/
public
interface
BandwidthResourceAllocation
extends
BandwidthResourceRequest
{
}
core/api/src/main/java/org/onlab/onos/net/resource/BandwidthResourceRequest.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
/**
* Representation of a request for bandwidth resource.
*/
public
interface
BandwidthResourceRequest
{
/**
* Returns the bandwidth resource.
*
* @return the bandwidth resource
*/
Bandwidth
bandwidth
();
}
core/api/src/main/java/org/onlab/onos/net/resource/Lambda.java
View file @
485b478
...
...
@@ -30,6 +30,7 @@ public final class Lambda extends LinkResource {
/**
* Returns lambda as an int value.
*
* @return lambda as an int value
*/
public
int
toInt
()
{
...
...
core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceAllocation.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
/**
* Representation of allocated lambda resource.
*/
public
interface
LambdaResourceAllocation
extends
LambdaResourceRequest
{
/**
* Returns the lambda resource.
*
* @return the lambda resource
*/
Lambda
lambda
();
}
core/api/src/main/java/org/onlab/onos/net/resource/LambdaResourceRequest.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
/**
* Representation of a request for lambda resource.
*/
public
interface
LambdaResourceRequest
{
}
core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceAllocations.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
import
org.onlab.onos.net.Link
;
/**
* Representation of allocated link resources.
*/
public
interface
LinkResourceAllocations
extends
LinkResourceRequest
{
/**
* Returns allocated resource for the given link.
*
* @param link the target link
* @return allocated resource for the link
*/
ResourceAllocation
getResourceAllocation
(
Link
link
);
}
core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceRequest.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
import
java.util.Collection
;
import
java.util.Set
;
import
org.onlab.onos.net.Link
;
import
org.onlab.onos.net.intent.IntentId
;
/**
* Representation of a request for link resource.
*/
public
interface
LinkResourceRequest
extends
ResourceRequest
{
/**
* Returns the {@link IntentId} associated with the request.
*
* @return the {@link IntentId} associated with the request
*/
IntentId
intendId
();
/**
* Returns the set of target links.
*
* @return the set of target links
*/
Collection
<
Link
>
links
();
/**
* Returns the set of resource requests.
*
* @return the set of resource requests
*/
Set
<
ResourceRequest
>
resources
();
}
core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
import
java.util.Map
;
import
org.onlab.onos.net.Link
;
import
org.onlab.onos.net.intent.IntentId
;
import
org.onlab.onos.net.intent.PathIntent
;
/**
* Service for providing link resource allocation.
...
...
@@ -12,49 +9,48 @@ import org.onlab.onos.net.intent.PathIntent;
public
interface
LinkResourceService
{
/**
* Allocates resources along the path.
* <p>
* Tries to allocate given resources on the links along the path specified
* by the given intent.
* Requests resources.
*
* @param re
s
resources to be allocated
* @
param intent an intent to be used for specifying the path
* @param re
q
resources to be allocated
* @
return allocated resources
*/
void
allocateResource
(
LinkResources
res
,
PathIntent
intent
);
LinkResourceAllocations
requestResources
(
LinkResourceRequest
req
);
/**
* Releases resources
along the path
.
* Releases resources.
*
* @param
intentId an ID for the intent for specifying the path
* @param
allocations resources to be released
*/
void
releaseResource
(
IntentId
intentId
);
void
releaseResource
s
(
LinkResourceAllocations
allocations
);
/**
* Returns all allocated resources
to each link
.
* Returns all allocated resources.
*
* @return allocated resources
to each link with {@link IntentId}
* @return allocated resources
*/
Map
<
Link
,
Map
<
IntentId
,
LinkResources
>>
allocatedResource
s
();
Iterable
<
LinkResourceAllocations
>
getAllocation
s
();
/**
* Returns all allocated resources to given link.
*
* @param link a target link
* @return allocated resources
to the target link with {@link IntentId}
* @return allocated resources
*/
Map
<
IntentId
,
LinkResources
>
allocatedResource
s
(
Link
link
);
Iterable
<
LinkResourceAllocations
>
getAllocation
s
(
Link
link
);
/**
* Returns a
vailable resources for each
link.
* Returns a
ll IDs of intents using the given
link.
*
* @return available resources for each link
* @param link a target link
* @return IDs of intents using the link
*/
Map
<
Link
,
LinkResources
>
availableResources
(
);
Iterable
<
IntentId
>
getIntents
(
Link
link
);
/**
* Returns available resources for given link.
*
* @param link a target link
* @return available resources for the target link
*/
LinkResources
a
vailableResources
(
Link
link
);
ResourceRequest
getA
vailableResources
(
Link
link
);
}
...
...
core/api/src/main/java/org/onlab/onos/net/resource/ResourceAllocation.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
/**
* Abstraction of allocated resource.
*/
public
interface
ResourceAllocation
extends
ResourceRequest
{
}
core/api/src/main/java/org/onlab/onos/net/resource/ResourceId.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
/**
* Representation of ID for allocated resource.
*/
public
interface
ResourceId
{
}
core/api/src/main/java/org/onlab/onos/net/resource/ResourceRequest.java
0 → 100644
View file @
485b478
package
org
.
onlab
.
onos
.
net
.
resource
;
/**
* Abstraction of resource request.
*/
public
interface
ResourceRequest
{
}
Please
register
or
login
to post a comment