> On Травень 18, 2016, 5:44 після полудня, Alejandro Fernandez wrote: > > Which use cases were tested? E.g., > > > > 1. Add a host with name foo > > 2. Attempt to readd a host with name FOO (should not allow this). > > 3. Query the host components of a host with name Foo > > 4. Delete a host with name fOO (should allow this) > > > > For the deletion, can use two different APIs, > > DELETE api/v1/clusters/$cluster_name/hosts/$name > > DELETE api/v1/hosts/$name > > > > I also remember that in MasterHostResolver.java we compared some hostnames, > > and it should be case-insensitive. > > Vitalyi Brodetskyi wrote: > Alejandro, the main goal of this jira was to make SmartSense work > correctly with ambari API. If you will take a look at description you will > see that i was asked to add "hostname lowercase" for API requests. For API > requests which contain hostname and API which has filter with hostname. > > Alejandro Fernandez wrote: > The Jira title implies that Ambari should support case-insensitive > hostnames in all cases. If this is only for SmartSense, then we should update > the Jira title accordingly and create another Jira to fix it for all > scenarios.
Agree. Changed jira title and now going to create jira for whole changes. - Vitalyi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47531/#review133773 ----------------------------------------------------------- On Травень 20, 2016, 5:56 після полудня, Vitalyi Brodetskyi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47531/ > ----------------------------------------------------------- > > (Updated Травень 20, 2016, 5:56 після полудня) > > > Review request for Ambari, Dmytro Sen, Nate Cole, Sumit Mohanty, and Sid > Wagle. > > > Repository: ambari > > > Description > ------- > > Ambari stores all hostnames in lower-case irrespective of the case in name > associated with the host. While this is OK for internal usage it causes > confusion to the users or the tools that look up hostname using standard > commands such as"hostname -f". > The API should be modified to allow hostnames in case insensitive fashion. > E.g. > api/v1/hosts/HostA and api/v1/hosts/hosta both should point to the same host > calls that user filter where they specify hostnames should also allow case > insensitive comparison > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryParser.java > 3af90ba > > ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java > 9c864b6 > > ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryParserTest.java > 90ad522 > > ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java > dfe8be7 > > Diff: https://reviews.apache.org/r/47531/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Vitalyi Brodetskyi > >