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
Sho SHIMIZU
2015-10-06 19:33:16 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e289f43608b615e0de69421b675a9ae6cf74d39c
e289f436
1 parent
d557925c
Narrow exceptions to be caught
Change-Id: I72d3153d8451e82bf2889d3fb983fdc9b5a37e6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
View file @
e289f43
...
...
@@ -68,7 +68,6 @@ import com.google.common.collect.ImmutableSet;
import
com.google.common.collect.Sets
;
import
static
com
.
google
.
common
.
base
.
Preconditions
.
checkNotNull
;
import
static
com
.
google
.
common
.
base
.
Preconditions
.
checkState
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
onosproject
.
net
.
AnnotationKeys
.
BANDWIDTH
;
...
...
@@ -295,6 +294,9 @@ public class ConsistentLinkResourceStore extends
intentAllocs
.
put
(
allocations
.
intentId
(),
allocations
);
allocations
.
links
().
forEach
(
link
->
allocateLinkResource
(
tx
,
link
,
allocations
));
tx
.
commit
();
}
catch
(
TransactionException
|
ResourceAllocationException
e
)
{
log
.
error
(
"Exception thrown, rolling back"
,
e
);
tx
.
abort
();
}
catch
(
Exception
e
)
{
log
.
error
(
"Exception thrown, rolling back"
,
e
);
tx
.
abort
();
...
...
@@ -312,9 +314,7 @@ public class ConsistentLinkResourceStore extends
if
(
req
instanceof
BandwidthResourceAllocation
)
{
// check if allocation should be accepted
if
(
avail
.
isEmpty
())
{
checkState
(!
avail
.
isEmpty
(),
"There's no Bandwidth resource on %s?"
,
link
);
throw
new
ResourceAllocationException
(
String
.
format
(
"There's no Bandwidth resource on %s?"
,
link
));
}
BandwidthResourceAllocation
bw
=
(
BandwidthResourceAllocation
)
avail
.
iterator
().
next
();
double
bwLeft
=
bw
.
bandwidth
().
toDouble
();
...
...
Please
register
or
login
to post a comment